lkml.org 
[lkml]   [2020]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] checkpatch: ignore ethtool CamelCase constants
Date
Ignore CamelCase constants describing Ethernet link parameters defined
in include/uapi/linux/ethtool.h.

Signed-off-by: Łukasz Stelmach <l.stelmach@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
\
 
 \ /
  Last update: 2020-10-22 13:03    [W:3.418 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site