summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2021-04-07 15:01:39 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-07 17:09:55 +0200
commit15b7a743901c9917d4357224a468554d4f848dac (patch)
tree3d6c525e62525b686c59bcd61fa2d62e50272f85 /drivers/staging/comedi
parent6db58ed2b2d9bb1792eace4f9aa70e8bdd730ffc (diff)
downloadlinux-15b7a743901c9917d4357224a468554d4f848dac.tar.bz2
staging: comedi: tests: ni_routes_test: Put complex values in parentheses
Fix checkpatch.pl errors such as: ERROR: Macros with complex values should be enclosed in parentheses +#define I1(x1) \ + (int[]){ \ + x1, 0 \ + } Also, wrap that `x1` in parentheses. Cc: Spencer E. Olson <olsonse@umich.edu> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Link: https://lore.kernel.org/r/20210407140142.447250-3-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r--drivers/staging/comedi/drivers/tests/ni_routes_test.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/staging/comedi/drivers/tests/ni_routes_test.c b/drivers/staging/comedi/drivers/tests/ni_routes_test.c
index 68defeb53de4..696e610f1822 100644
--- a/drivers/staging/comedi/drivers/tests/ni_routes_test.c
+++ b/drivers/staging/comedi/drivers/tests/ni_routes_test.c
@@ -63,24 +63,24 @@ static const int no_val_dest = O(7), no_val_index = 4;
/* I1 and I2 should not call O(...). Mostly here to shut checkpatch.pl up */
#define I1(x1) \
- (int[]){ \
- x1, 0 \
- }
+ ((int[]){ \
+ (x1), 0 \
+ })
#define I2(x1, x2) \
- (int[]){ \
+ ((int[]){ \
(x1), (x2), 0 \
- }
+ })
#define I3(x1, x2, x3) \
- (int[]){ \
+ ((int[]){ \
(x1), (x2), (x3), 0 \
- }
+ })
/* O9 is build to call O(...) for each arg */
#define O9(x1, x2, x3, x4, x5, x6, x7, x8, x9) \
- (int[]){ \
+ ((int[]){ \
O(x1), O(x2), O(x3), O(x4), O(x5), O(x6), O(x7), O(x8), O(x9), \
0 \
- }
+ })
static struct ni_device_routes DR = {
.device = "testdev",