Commit 4ebe6f46 authored by Helen Fornazier's avatar Helen Fornazier Committed by Greg Kroah-Hartman

staging: fbtft: Remove do {} while(0) in single statement macro

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: default avatarHelen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1f5f636c
...@@ -259,9 +259,7 @@ struct fbtft_par { ...@@ -259,9 +259,7 @@ struct fbtft_par {
#define NUMARGS(...) (sizeof((int[]){__VA_ARGS__})/sizeof(int)) #define NUMARGS(...) (sizeof((int[]){__VA_ARGS__})/sizeof(int))
#define write_reg(par, ...) \ #define write_reg(par, ...) \
do { \ par->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__)
par->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__); \
} while (0)
/* fbtft-core.c */ /* fbtft-core.c */
extern void fbtft_dbg_hex(const struct device *dev, extern void fbtft_dbg_hex(const struct device *dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment