greybus: loopback: remove checkpatch error causing macro
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Sun, 16 Aug 2015 23:55:10 +0000 (00:55 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 18 Aug 2015 16:45:23 +0000 (09:45 -0700)
checkpatch.pl is choking on a later change to dev_stats_attrs, where
checkpatch expects to see the values encapsulated in curly brackets.
Encapsulating in curly brackets will cause a compiler error. To resolve the
dichotomy this patch drops the macros and adds the arrary declarations
directly.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/loopback.c

index ff2e79212877c5e9ebeffd89e2bcdc24ad539049..0a9bc9139109cb85aa3d9a7411aeea438d43ecaf 100644 (file)
@@ -271,16 +271,19 @@ gb_dev_loopback_ro_attr(iteration_count);
 /* A bit-mask of destination connecitons to include in the test run */
 gb_dev_loopback_rw_attr(mask, u);
 
-#define dev_stats_attrs(name)                                          \
-       &dev_attr_##name##_min.attr,                                    \
-       &dev_attr_##name##_max.attr,                                    \
-       &dev_attr_##name##_avg.attr
-
 static struct attribute *loopback_attrs[] = {
-       dev_stats_attrs(latency),
-       dev_stats_attrs(latency_gb),
-       dev_stats_attrs(requests_per_second),
-       dev_stats_attrs(throughput),
+       &dev_attr_latency_min.attr,
+       &dev_attr_latency_max.attr,
+       &dev_attr_latency_avg.attr,
+       &dev_attr_latency_gb_min.attr,
+       &dev_attr_latency_gb_max.attr,
+       &dev_attr_latency_gb_avg.attr,
+       &dev_attr_requests_per_second_min.attr,
+       &dev_attr_requests_per_second_max.attr,
+       &dev_attr_requests_per_second_avg.attr,
+       &dev_attr_throughput_min.attr,
+       &dev_attr_throughput_max.attr,
+       &dev_attr_throughput_avg.attr,
        &dev_attr_type.attr,
        &dev_attr_size.attr,
        &dev_attr_ms_wait.attr,