Re: [REPORT] False positive errors found while using scripts/checkpatch.pl

From: Joe Perches
Date: Sun Jun 28 2020 - 10:53:46 EST


On Sun, 2020-06-28 at 10:00 -0400, B K Karthik wrote:
> The following are reported while using checkpatch.pl on
> drivers/staging/fbtft/fbtft-bus.c
>
> ERROR: space prohibited before that close parenthesis ')'
> #65: FILE: drivers/staging/fbtft/fbtft-bus.c:65:
> +define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, u8, )
>
> ERROR: space prohibited before that close parenthesis ')'
> #67: FILE: drivers/staging/fbtft/fbtft-bus.c:67:
> +define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, u16, )
>
> These are false positives as correcting these issues breaks the build.

Thanks, there's no capability to recognize this in checkpatch.
checkpatch is not a compiler.

Perhaps a reasonable solution is to add a comment around the
macro uses that show it's an unusual case.