Message ID | 20230104201524.28078-1-gerhard@engleder-embedded.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5336200wrt; Wed, 4 Jan 2023 12:18:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXvk/7zUJ0usosXbv6KoEP2M+NOh8p5wqKuqaW70tvAOffHPLBs//kn+4JWnJP71s0JaHrj/ X-Received: by 2002:a05:6a20:988a:b0:ad:79bb:7485 with SMTP id jk10-20020a056a20988a00b000ad79bb7485mr47104825pzb.11.1672863485789; Wed, 04 Jan 2023 12:18:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672863485; cv=none; d=google.com; s=arc-20160816; b=z4v8Wk7YFL29tMClfIhAem9WEXZ4rs16bCdqcImwWTE+R2z45eYPiEkEcJkbGDVTvN R+NXSCKUgBzSSDyxi662tey0jvBD3ptNxnBo0glJxCu1fImwG+LVGw/qljSFVtXrt8O3 D3tZDeou4hFYUWGaBgxY/sdxdSorGh2xP6+dfT063suNE+2MDyTqXoLr6uJdh62apR1n 49HKuZE/XKaobNSoajaybQPomI6SdaXc2Btw9i1+T/Y2OrMU79QL0aIvKt/pPcBIn0vx SJzxoBuP8l5Co0AZNtwS7CXTCZL3VCyTHW+/HzJVA6YA91V/GdD+YuzRsDo3S4rXj32c 1CSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=C0bMdoWKeCFjYfejvYkmS+qO/S9NQwdBaH83mEYfQ5E=; b=Cz19WLxqQ/HwflRefU0n3s7+MuXLzkS5YBzYJPXZXW0t+WsOE1AL3zZ+42QjoIg9Q1 f+Mb9rXm/3iwv+e60O4920muqyxkSwfzHy03O8D/F6kMZBedNw9QJNPy3bjbv8nEGDxX I0voaB20iVEiyRW0+BZonvdCfAwo9+YxIZgIREZiM8X4isi6+yDeHPB0OLRc/l8RlCiv 93nnt6IdhGf4xS92YkT3cnhtakSrk2dE88TifWqXuse8HW5fPq3N6hAgFMs8+MqF463k CZQbh717HeGrB6jcFHg8uDeX3mDoaOHoYaNZ2RC83EvAOEZWA/j7+t8L4bDotG8yLnb3 bYNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@engleder-embedded.com header.s=dkim11 header.b="p7ulw3/x"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a12-20020a63e84c000000b004a42cabd42asi7459583pgk.37.2023.01.04.12.17.53; Wed, 04 Jan 2023 12:18:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@engleder-embedded.com header.s=dkim11 header.b="p7ulw3/x"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240283AbjADUQn (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Wed, 4 Jan 2023 15:16:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240099AbjADUQT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 4 Jan 2023 15:16:19 -0500 Received: from mx23lb.world4you.com (mx23lb.world4you.com [81.19.149.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 708BF4085E for <linux-kernel@vger.kernel.org>; Wed, 4 Jan 2023 12:15:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=engleder-embedded.com; s=dkim11; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=C0bMdoWKeCFjYfejvYkmS+qO/S9NQwdBaH83mEYfQ5E=; b=p7ulw3/xTwepHz53Ltul6SJRaz lGNjsG19kWzebYll0Fs4DAYlL/645nv44DJZx14JzsjlJ66dII/GlcD0ntImAV+6IXSnCa39TBC/0 LQfTIt6yppAy6IV7lV1GJ9azRZxDofMhj5V/08a/gKQy5KuzBRtVEusD4v6b4YxJIFyQ=; Received: from [88.117.53.17] (helo=hornet.engleder.at) by mx23lb.world4you.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <gerhard@engleder-embedded.com>) id 1pDAAf-0005Ib-8I; Wed, 04 Jan 2023 21:15:33 +0100 From: Gerhard Engleder <gerhard@engleder-embedded.com> To: linux-kernel@vger.kernel.org Cc: apw@canonical.com, joe@perches.com, dwaipayanray1@gmail.com, lukas.bulwahn@gmail.com, Gerhard Engleder <gerhard@engleder-embedded.com> Subject: [PATCH v2] checkpatch: Ignore ETHTOOL_LINK_MODE_ enum values Date: Wed, 4 Jan 2023 21:15:24 +0100 Message-Id: <20230104201524.28078-1-gerhard@engleder-embedded.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AV-Do-Run: Yes X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754124502396704638?= X-GMAIL-MSGID: =?utf-8?q?1754124502396704638?= |
Series |
[v2] checkpatch: Ignore ETHTOOL_LINK_MODE_ enum values
|
|
Commit Message
Gerhard Engleder
Jan. 4, 2023, 8:15 p.m. UTC
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(+)
Comments
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.
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
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_]+)?$/ &&