staging: fbtft: Remove do {} while(0) in single statement macro
authorHelen Fornazier <helen.fornazier@gmail.com>
Wed, 25 Mar 2015 23:56:43 +0000 (20:56 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 09:40:31 +0000 (10:40 +0100)
This patch fixes the checkpatch.pl warning:

WARNING: Single statement macros should not use a do {} while (0) loop
+#define write_reg(par, ...)                                              \
+do {                                                                     \
+       par->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__); \
+} while (0)

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft.h

index 36ecf026d67d0ae367fad4f5f551a18a4b8c2e47..f55cc5b77c150f47dc61ff2337f7604aac2c3fc2 100644 (file)
@@ -259,9 +259,7 @@ struct fbtft_par {
 #define NUMARGS(...)  (sizeof((int[]){__VA_ARGS__})/sizeof(int))
 
 #define write_reg(par, ...)                                              \
-do {                                                                     \
-       par->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__); \
-} while (0)
+       par->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__)
 
 /* fbtft-core.c */
 extern void fbtft_dbg_hex(const struct device *dev,