* False positive in checkpatch.pl ?
@ 2015-06-05 17:21 Aseda Aboagye
2015-06-05 17:43 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: Aseda Aboagye @ 2015-06-05 17:21 UTC (permalink / raw)
To: apw, joe, linux-kernel
Hello CHECKPATCH maintainers,
I encountered this error when using the checkpatch.pl script
complaining about my macro.
Errors:
* checkpatch.pl errors/warnings
ERROR: Macros with complex values should be enclosed in parenthesis
#92: FILE: include/libsharedobjs.h:28:
+#define SHAREDLIB(...) __attribute__
((section(".roshared"))) __VA_ARGS__
total: 1 errors, 0 warnings, 45 lines checked
Since it's really an attribute, adding the parens wouldn't work. Just
thought I'd send this your way. Perhaps make an exception for cases
like these?
Thanks,
--
Aseda Aboagye
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: False positive in checkpatch.pl ?
2015-06-05 17:21 False positive in checkpatch.pl ? Aseda Aboagye
@ 2015-06-05 17:43 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2015-06-05 17:43 UTC (permalink / raw)
To: Aseda Aboagye; +Cc: apw, linux-kernel
On Fri, 2015-06-05 at 10:21 -0700, Aseda Aboagye wrote:
> Hello CHECKPATCH maintainers,
>
> I encountered this error when using the checkpatch.pl script
> complaining about my macro.
>
> Errors:
> * checkpatch.pl errors/warnings
>
> ERROR: Macros with complex values should be enclosed in parenthesis
> #92: FILE: include/libsharedobjs.h:28:
> +#define SHAREDLIB(...) __attribute__
> ((section(".roshared"))) __VA_ARGS__
>
> total: 1 errors, 0 warnings, 45 lines checked
>
> Since it's really an attribute, adding the parens wouldn't work. Just
> thought I'd send this your way. Perhaps make an exception for cases
> like these?
SHAREDLIB is not used in the kernel tree.
Maybe add an exception in your own checkpatch version.
Though maybe adding a SHAREDLIB macro without the ... and
make it a simple #define instead like below would be better
#define SHAREDLIB __attribute__((section(".roshared")))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-05 17:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-05 17:21 False positive in checkpatch.pl ? Aseda Aboagye
2015-06-05 17:43 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox