checkpatch: whitelist SUPPORTED_*/ADVERTISED_* defines from ethtool.h
PATCH 1/1 checkpatch: whitelist SUPPORTED_*/ADVERTISED_* defines from ethtool.h
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 <[email protected]>
--- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+)
scripts/checkpatch.pl +1 -0
@@ -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",
Signature · 1 line
1.7.10.4
Joe Perches
maintainerQuoted 2 lines · Jonas Gorski
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.