From patchwork Fri Dec 30 19:59:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerhard Engleder X-Patchwork-Id: 37753 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3050086wrt; Fri, 30 Dec 2022 12:12:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXuDIaLKeNRu59ZBJwfQAoAKwU3H08op/CrTSUWWsPp/VIT5UgNO8OZXjbjDJGMUUUep4bbU X-Received: by 2002:a05:6402:550a:b0:47f:bc9b:46ec with SMTP id fi10-20020a056402550a00b0047fbc9b46ecmr22991547edb.7.1672431154834; Fri, 30 Dec 2022 12:12:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672431154; cv=none; d=google.com; s=arc-20160816; b=i9WtnCYD1dhGOWgNK0zr2SkA07mCjCvxeRn+hG43iySBTASgthjy4xm4/sedXGyBQN EEU5eBduNGXAJD/N8gnmTCeWndZjhLiAYx8oT/XlRMiP6cSCaReLXvbJdyc5fmJm0tx1 z2laRUor9r33GTnIG34eZNRm11HOV4OSsynT0pz/1dD6GLRCl42yJuPqOZAX8PfxxEzS 6MzmDmsyNALQQ2MuA6kDEA3FSM7/y/7j0Ra6dOXwqFKmiCeY8S0BdOYRuZUuhKR8/C6v bvUFtcS8UckerjUXITvTfziMWoyMzU+u0qYdgqZiwJCITxZfSlOWur8o4AZJ8YvfU173 t3CA== 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=5LxiZbNutuBjQgn8LK2YxJds1kf/AkLT+85DSs2psfU=; b=Ld4HZYKYApWL/9RXiNbVAdQ776fc0cZe5XN9Pn9Y0bn1eMc2CXe0BoHZlwGHQy8OSe qzvPJaOiil4k1FaKbMSPycG1jSF9tzskDWEFIEILNxacDb8VgGfVbnmguwB1iRbP8D0Q sYjpTECyuklB12SpamJ6dQTn3qBUEyHqeJeFEhwd2i462FMZWDLh75BKf9288HCY4hEB Eu7vTSnq7L/VikCl/8PQHk8+YfzIeRYyT2GlQtxkKSDDfjQkcKATh5jYcjcvrstE+wXF UStGP5t1ID3awLgGwGpQ5JcJ+po/BJPkNQfobx0GawkelUQurUPxBG/JjxWdvbZHi0LV pgOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@engleder-embedded.com header.s=dkim11 header.b=slM+tjtk; 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 sz15-20020a1709078b0f00b007adb2862222si14683454ejc.828.2022.12.30.12.12.11; Fri, 30 Dec 2022 12:12:34 -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=slM+tjtk; 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 S229681AbiL3UJW (ORCPT + 99 others); Fri, 30 Dec 2022 15:09:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231210AbiL3UJV (ORCPT ); Fri, 30 Dec 2022 15:09:21 -0500 X-Greylist: delayed 594 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 30 Dec 2022 12:09:18 PST Received: from mx07lb.world4you.com (mx07lb.world4you.com [81.19.149.117]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A74D1AA2E for ; Fri, 30 Dec 2022 12:09:18 -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=5LxiZbNutuBjQgn8LK2YxJds1kf/AkLT+85DSs2psfU=; b=slM+tjtkNgHxIJb0pFROt0dcTI YY4MxdTwbEJSsfWAQPGB/dxsQIbdKAc1GV40dWnoLdjzx2CLwfXbRWd/t9JT9IQohVSSwsYBtlRr6 NdrSd1LRlR2OKkmolnw5zfO7foYzAPSXYfQ1t+lJK2tLQN7HOZvdR/YGO4pUe6YB+6nk=; Received: from [88.117.53.17] (helo=hornet.engleder.at) by mx07lb.world4you.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pBLXF-0003ry-QX; Fri, 30 Dec 2022 20:59:21 +0100 From: Gerhard Engleder To: linux-kernel@vger.kernel.org Cc: apw@canonical.com, joe@perches.com, dwaipayanray1@gmail.com, lukas.bulwahn@gmail.com, Gerhard Engleder Subject: [PATCH] checkpatch: Ignore ETHTOOL_LINK_MODE_ enum values Date: Fri, 30 Dec 2022 20:59:07 +0100 Message-Id: <20221230195907.3959-1-gerhard@engleder-embedded.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 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,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753671170648243643?= X-GMAIL-MSGID: =?utf-8?q?1753671170648243643?= 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. Extend regex to match also substrings like '1000baseT'. Signed-off-by: Gerhard Engleder --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 78cc595b98ce..861fa547001e 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5780,7 +5780,7 @@ sub process { if ($var !~ /^$Constant$/ && $var =~ /[A-Z][a-z]|[a-z][A-Z]/ && #Ignore some autogenerated defines and enum values - $var !~ /^(?:[A-Z]+_){1,5}[A-Z]{1,3}[a-z]/ && + $var !~ /^(?:[A-Z]+_){1,5}([A-Z]{1,3}[a-z]|[0-9]+[a-z]+[A-Z])/ && #Ignore Page variants $var !~ /^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ && #Ignore SI style variants like nS, mV and dB