Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] staging: fbtft: missing argument in define_fbtft_write_reg() breaks 
build
--

commit b28f14a98f84b888195dbf0a2f659dbf742f021c
Author: gtl-m <[email protected]>

staging: fbtft: fix syntax errors in macros

This commit removes trailing commas and spaces before closing parentheses in
two define_fbtft_write_reg() macro invocations to address checkpatch.pl
warnings.

> diff --git a/drivers/staging/fbtft/fbtft-bus.c 
> b/drivers/staging/fbtft/fbtft-bus.c
> index 30e436ff19e4c..409770891c548 100644
> --- a/drivers/staging/fbtft/fbtft-bus.c
> +++ b/drivers/staging/fbtft/fbtft-bus.c
> @@ -62,9 +62,9 @@ out:                                                        
>                       \
>  }                                                                            
>  \
>  EXPORT_SYMBOL(func);
>  
> -define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, )
> +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_reg16_bus16, u16, u16)

[Severity: Low]
Does removing the trailing comma break the build when CONFIG_FB_TFT is
enabled?

In drivers/staging/fbtft/fbtft-bus.c, define_fbtft_write_reg() is defined
as a 4-argument macro:

#define define_fbtft_write_reg(func, buffer_type, data_type, modifier)        \
void func(struct fbtft_par *par, int len, ...)                                \
{                                                                             \
...
        *buf = modifier((data_type)va_arg(args, unsigned int));               \

For fbtft_write_reg8_bus8() and fbtft_write_reg16_bus16(), no byte-order
conversion modifier is needed, so the trailing comma intentionally passes an
empty fourth argument to the macro. Removing the comma passes only 3
arguments to a 4-parameter macro, causing the C preprocessor to fail the
build.

>  
>  void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
>  {

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to