From: Joe Perches <joe@perches.com>
To: Gerhard Engleder <gerhard@engleder-embedded.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Cc: apw@canonical.com, dwaipayanray1@gmail.com, lukas.bulwahn@gmail.com
Subject: Re: [PATCH v2] checkpatch: Ignore ETHTOOL_LINK_MODE_ enum values
Date: Thu, 05 Jan 2023 14:24:27 -0800 [thread overview]
Message-ID: <435e1e0fd256bc2e58f0abe1255d9f13a786ca11.camel@perches.com> (raw)
In-Reply-To: <20230104201524.28078-1-gerhard@engleder-embedded.com>
On Wed, 2023-01-04 at 21:15 +0100, Gerhard Engleder wrote:
> Since commit 4104a20646 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.
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -5783,6 +5783,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_]+)?$/ &&
These ETHTOOL enums also exist but are caught by the SI style variants test
ETHTOOL_A_CABLE_PULSE_mV
ETHTOOL_A_CABLE_AMPLITUDE_mV
So I guess it's OK. Thanks.
next prev parent reply other threads:[~2023-01-05 22:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-04 20:15 Gerhard Engleder
2023-01-05 22:24 ` Joe Perches [this message]
2023-03-07 19:59 ` Gerhard Engleder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=435e1e0fd256bc2e58f0abe1255d9f13a786ca11.camel@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=dwaipayanray1@gmail.com \
--cc=gerhard@engleder-embedded.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®