Clean up the following checkpatch error and warning in fbtft-bus.c. drivers/staging/fbtft/fbtft-bus.c:14: WARNING: macros should not use a trailing semicolon drivers/staging/fbtft/fbtft-bus.c:65: ERROR: space prohibited before that close parenthesis ')' drivers/staging/fbtft/fbtft-bus.c:67: ERROR: space prohibited before that close parenthesis ')'
The reason of that error is the modifier argument is optional to the macro define_fbtft_write_reg. So, even if removing the space before close parenthesis, another error "space required after that ','" occurs. In this fix, I change that modifier argument as optional, so that it is both ok to use that macro with or without modifier argument. Signed-off-by: Eric LI <[email protected]> --- drivers/staging/fbtft/fbtft-bus.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c index 30e436ff19e4..e483ecb10938 100644 --- a/drivers/staging/fbtft/fbtft-bus.c +++ b/drivers/staging/fbtft/fbtft-bus.c @@ -11,7 +11,7 @@ * *****************************************************************************/ -#define define_fbtft_write_reg(func, buffer_type, data_type, modifier) \ +#define define_fbtft_write_reg(func, buffer_type, data_type, modifier...) \ void func(struct fbtft_par *par, int len, ...) \ { \ va_list args; \ @@ -60,11 +60,11 @@ void func(struct fbtft_par *par, int len, ...) \ out: \ va_end(args); \ } \ -EXPORT_SYMBOL(func); +EXPORT_SYMBOL(func) -define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, ) -define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16) -define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, ) +define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8); +define_fbtft_write_reg(fbtft_write_reg16_bus8, __be16, u16, cpu_to_be16); +define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16); void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...) { -- 2.34.1
