Ignore CamelCase constants describing Ethernet link parameters defined
in include/uapi/linux/ethtool.h.

Signed-off-by: Łukasz Stelmach <l.stelm...@samsung.com>
---
 scripts/checkpatch.pl | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index fab38b493cef..31789c090140 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5295,6 +5295,10 @@ sub process {
 #CamelCase
                        if ($var !~ /^$Constant$/ &&
                            $var =~ /[A-Z][a-z]|[a-z][A-Z]/ &&
+#Ignore constants from include/uapi/linux/ethtool.h
+                           $var !~ /^ETHTOOL_LINK_MODE_[0-9A-Za-z_]+_BIT$/ &&
+                           $var !~ /^ADVERTISED_[0-9A-Za-z_]+$/ &&
+                           $var !~ /^SUPPORTED_[0-9A-Za-z_]+$/ &&
 #Ignore Page<foo> variants
                            $var !~ 
/^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ &&
 #Ignore SI style variants like nS, mV and dB
-- 
2.26.2

Reply via email to