Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Gerhard Engleder and committed by
Andrew Morton
d99a4158 4b3d049f

+2
+2
scripts/checkpatch.pl
··· 5809 5809 $var !~ /^(?:[A-Z]+_){1,5}[A-Z]{1,3}[a-z]/ && 5810 5810 #Ignore Page<foo> variants 5811 5811 $var !~ /^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ && 5812 + #Ignore ETHTOOL_LINK_MODE_<foo> variants 5813 + $var !~ /^ETHTOOL_LINK_MODE_/ && 5812 5814 #Ignore SI style variants like nS, mV and dB 5813 5815 #(ie: max_uV, regulator_min_uA_show, RANGE_mA_VALUE) 5814 5816 $var !~ /^(?:[a-z0-9_]*|[A-Z0-9_]*)?_?[a-z][A-Z](?:_[a-z0-9_]+|_[A-Z0-9_]+)?$/ &&