* [PATCH v2] checkpatch: Ignore ETHTOOL_LINK_MODE_ enum values
@ 2023-01-04 20:15 Gerhard Engleder
2023-01-05 22:24 ` Joe Perches
0 siblings, 1 reply; 3+ messages in thread
From: Gerhard Engleder @ 2023-01-04 20:15 UTC (permalink / raw)
To: linux-kernel; +Cc: apw, joe, dwaipayanray1, lukas.bulwahn, Gerhard Engleder
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.
Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com>
---
scripts/checkpatch.pl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 78cc595b98ce..38659f22e54d 100755
--- 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_]+)?$/ &&
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] checkpatch: Ignore ETHTOOL_LINK_MODE_ enum values
2023-01-04 20:15 [PATCH v2] checkpatch: Ignore ETHTOOL_LINK_MODE_ enum values Gerhard Engleder
@ 2023-01-05 22:24 ` Joe Perches
2023-03-07 19:59 ` Gerhard Engleder
0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2023-01-05 22:24 UTC (permalink / raw)
To: Gerhard Engleder, linux-kernel, Andrew Morton
Cc: apw, dwaipayanray1, lukas.bulwahn
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] checkpatch: Ignore ETHTOOL_LINK_MODE_ enum values
2023-01-05 22:24 ` Joe Perches
@ 2023-03-07 19:59 ` Gerhard Engleder
0 siblings, 0 replies; 3+ messages in thread
From: Gerhard Engleder @ 2023-03-07 19:59 UTC (permalink / raw)
To: Joe Perches, linux-kernel, Andrew Morton
Cc: apw, dwaipayanray1, lukas.bulwahn
On 05.01.23 23:24, Joe Perches wrote:
> 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.
Did I miss to do something to get this merged? Shall I post it again?
Gerhard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-07 20:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-04 20:15 [PATCH v2] checkpatch: Ignore ETHTOOL_LINK_MODE_ enum values Gerhard Engleder
2023-01-05 22:24 ` Joe Perches
2023-03-07 19:59 ` Gerhard Engleder
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®