2020-06-28 14:03:36

by B K Karthik

[permalink] [raw]
Subject: [REPORT] False positive errors found while using scripts/checkpatch.pl

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.


Attachments:
(No filename) (509.00 B)
signature.asc (673.00 B)
Download all attachments

2020-06-28 14:56:52

by Joe Perches

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

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.