[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201022110113.3505-1-l.stelmach@samsung.com>
Date: Thu, 22 Oct 2020 13:01:13 +0200
From: Łukasz Stelmach <l.stelmach@...sung.com>
To: Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>,
linux-kernel@...r.kernel.org
Cc: Bartłomiej Żolnierkiewicz
<b.zolnierkie@...sung.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Łukasz Stelmach <l.stelmach@...sung.com>
Subject: [PATCH] checkpatch: ignore ethtool CamelCase constants
Ignore CamelCase constants describing Ethernet link parameters defined
in include/uapi/linux/ethtool.h.
Signed-off-by: Łukasz Stelmach <l.stelmach@...sung.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
Powered by blists - more mailing lists