From: Helen Fornazier Date: Wed, 25 Mar 2015 23:56:43 +0000 (-0300) Subject: staging: fbtft: Remove do {} while(0) in single statement macro X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4ebe6f46cb20b004e94e9862509085f6b7e69366;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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: Helen Fornazier Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h index 36ecf026d67d..f55cc5b77c15 100644 --- a/drivers/staging/fbtft/fbtft.h +++ b/drivers/staging/fbtft/fbtft.h @@ -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,