* [PATCH] checkpatch: whitelist SUPPORTED_*/ADVERTISED_* defines from ethtool.h
@ 2013-04-13 14:10 Jonas Gorski
2013-04-13 19:05 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: Jonas Gorski @ 2013-04-13 14:10 UTC (permalink / raw)
To: linux-kernel; +Cc: Andy Whitcroft, Joe Perches
Don't complain about camelcase when using SUPPORTED_*/ADVERTISED_*
defines, they are part of the user api so can't be (easily) fixed.
Removes false positives in e.g. ethernet drivers like:
WARNING: Avoid CamelCase: <SUPPORTED_Autoneg>
+ SUPPORTED_Autoneg |
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
---
scripts/checkpatch.pl | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b28cc38..349559a4 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2931,6 +2931,7 @@ sub process {
if ($var !~ /$Constant/ &&
$var =~ /[A-Z]\w*[a-z]|[a-z]\w*[A-Z]/ &&
$var !~ /"^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ &&
+ $var !~ /^(?:SUPPORTED|ADVERTISED)_\w*/ &&
!defined $camelcase{$var}) {
$camelcase{$var} = 1;
WARN("CAMELCASE",
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] checkpatch: whitelist SUPPORTED_*/ADVERTISED_* defines from ethtool.h
2013-04-13 14:10 [PATCH] checkpatch: whitelist SUPPORTED_*/ADVERTISED_* defines from ethtool.h Jonas Gorski
@ 2013-04-13 19:05 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2013-04-13 19:05 UTC (permalink / raw)
To: Jonas Gorski, Andrew Morton; +Cc: linux-kernel, Andy Whitcroft
On Sat, 2013-04-13 at 16:10 +0200, Jonas Gorski wrote:
> Don't complain about camelcase when using SUPPORTED_*/ADVERTISED_*
> defines, they are part of the user api so can't be (easily) fixed.
CamelCase was downgraded recently to a --strict test.
https://lkml.org/lkml/2013/4/11/273
Still, there's a large quantity of CamelCase names in
include/... that would still exist in any case.
A complete whitelist would be very long.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-13 19:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-13 14:10 [PATCH] checkpatch: whitelist SUPPORTED_*/ADVERTISED_* defines from ethtool.h Jonas Gorski
2013-04-13 19:05 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).