summaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorGerhard Engleder <gerhard@engleder-embedded.com>2023-01-04 21:15:24 +0100
committerAndrew Morton <akpm@linux-foundation.org>2023-04-08 13:45:37 -0700
commitd99a4158c4483c7f47274937deb142cd8c461b77 (patch)
treeb86ceef3be120eef10224359b1be9c4442fe8245 /scripts/checkpatch.pl
parent4b3d049f1c567560191884d4bd8f6e99ab885e20 (diff)
downloadlinux-stable-d99a4158c4483c7f47274937deb142cd8c461b77.tar.gz
linux-stable-d99a4158c4483c7f47274937deb142cd8c461b77.tar.bz2
linux-stable-d99a4158c4483c7f47274937deb142cd8c461b77.zip
checkpatch: ignore ETHTOOL_LINK_MODE_ enum values
Since commit 4104a20646 ("checkpatch: ignore generated CamelCase defines and enum values") enum values like ETHTOOL_LINK_MODE_Asym_Pause_BIT are ignored. But there are other enums like ETHTOOL_LINK_MODE_1000baseT_Full_BIT, which are not ignored because of the not matching '1000baseT' substring. Add regex to match all ETHTOOL_LINK_MODE enums. Link: https://lkml.kernel.org/r/20230104201524.28078-1-gerhard@engleder-embedded.com Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com> Cc: Andy Whitcroft <apw@canonical.com> Cc: Dwaipayan Ray <dwaipayanray1@gmail.com> Cc: Gerhard Engleder <gerhard@engleder-embedded.com> Cc: Joe Perches <joe@perches.com> Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index bd44d12965c9..c7cd0750b41e 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5809,6 +5809,8 @@ sub process {
$var !~ /^(?:[A-Z]+_){1,5}[A-Z]{1,3}[a-z]/ &&
#Ignore Page<foo> variants
$var !~ /^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ &&
+#Ignore ETHTOOL_LINK_MODE_<foo> variants
+ $var !~ /^ETHTOOL_LINK_MODE_/ &&
#Ignore SI style variants like nS, mV and dB
#(ie: max_uV, regulator_min_uA_show, RANGE_mA_VALUE)
$var !~ /^(?:[a-z0-9_]*|[A-Z0-9_]*)?_?[a-z][A-Z](?:_[a-z0-9_]+|_[A-Z0-9_]+)?$/ &&