Message ID | 20231205110524.16561-1-przemyslaw.kitszel@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3350608vqy; Tue, 5 Dec 2023 03:06:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHt+vqxDP/kwNhM6v0Xyq9fDoKET7oqMqSX/cN8WNT4Y1TDrIlbvnuWKeKqe0eKT4E/IeKK X-Received: by 2002:a17:903:5c5:b0:1d0:7558:a7fa with SMTP id kf5-20020a17090305c500b001d07558a7famr2787599plb.121.1701774367067; Tue, 05 Dec 2023 03:06:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701774367; cv=none; d=google.com; s=arc-20160816; b=iyisabLl2XEzuxLcID1j7KEPh5wSNoaCf7yk11skp8YKbDB2lUN6G+KuQyxxh8taz1 w8HccouJjs3cGUWnn+9qDZf4J74iS7fdng7ITIUuWbEt8zsXDoUTeh0H5tAujY49NNTu Fsqg4pX15o4ntfPFej3zHebI87lPQfzBw70xkAvsTamYCgk2elR9/UjUUDM2YS0Gic18 EKNZD216Gz7zEQBjPTzgqlMcmyijePXphvbL7Ce8wZh1JverzUteHa5vTjJ+ZhnMRF31 VNuXWg3cc+QVoxy25vHjdDGH340wklKO55FliLdG81kia985RpllMXjNsZpU4r9LyHwh x8nA== 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=Ze3GtR4fHcIVF2Q+Shs76qRgi5B48tA3xAFDpKtfxfQ=; fh=MtTe2hD20yFZkBL9gPZncu5NsyTdpFNihJnR1hfATng=; b=iBiZB2SkgnZCumeXH0zVJTdW1GOCJ9VFq3bob7dV6fRnsh37tgdnJU+SN6fCMREGYa ot9WbNrL0SJ4vJGD6cJRHNUte/3pGjZd5LHbeAswYHEAHs7cooHeSXnBGWCgpCGlbe50 7vdQBJChBLp/jlAXyH9uIKtoTamALpHO043oQLhWi7ivZybSzKMPLIbKUTETjoByN6f4 2z6bfZpSGXcISepxO8EwyY2ulhuHcJ68chJ9fBItjtz7powLVRerc9CkR1uNJlE3eP83 oVYrgQkkQsZhdKkZguHhoyDOBLJ5xBdoKWSAm6HduCPhcShzB16bgMEAx1ykqBvZ6mpe DPDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=A+cwSuOh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id x13-20020a170902820d00b001d09aec8a00si3519705pln.371.2023.12.05.03.06.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 03:06:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=A+cwSuOh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 56DF880A1D83; Tue, 5 Dec 2023 03:06:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346615AbjLELFt (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Tue, 5 Dec 2023 06:05:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346704AbjLELFh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 5 Dec 2023 06:05:37 -0500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D449E1A4 for <linux-kernel@vger.kernel.org>; Tue, 5 Dec 2023 03:05:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701774340; x=1733310340; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=MtgjgihwtjovEHQJaw83fYIfiHql8sN/+5TOGRQ95Vs=; b=A+cwSuOhS3p+qh2t6LqyJewOf0xHp8gWRLlHgRfmFOOz8daSaQ3y+nbm lAHxKG/JvOpaIeIRXXL9kduI6YjbN54+J+Zao5MilDxwER5cZPAHFWaG7 XKnIw3DuZaFxhRXjtTGjjmDQcIWrHMmYCaEHjPSQo0G8B/yHp6qNwtVLj bHJvyXgTdEpj8miTpSJw/0Za4cAiewtHbyG7yTmGBX05miuyBGBgo5teH 1u8YNjbxWsWaOfkB0SqRTfJIczEqEQKx1V01F7mfdKhzcVg7P2k5BSI52 urBaaICbdnpYxCyH01PO2gBbOx23l5VQ6xkGqBNHEZNVlVxPh27GYSjPa w==; X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="940498" X-IronPort-AV: E=Sophos;i="6.04,251,1695711600"; d="scan'208";a="940498" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2023 03:05:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="747187522" X-IronPort-AV: E=Sophos;i="6.04,251,1695711600"; d="scan'208";a="747187522" Received: from irvmail002.ir.intel.com ([10.43.11.120]) by orsmga006.jf.intel.com with ESMTP; 05 Dec 2023 03:05:36 -0800 Received: from pkitszel-desk.tendawifi.com (adokucha-mobl3.ger.corp.intel.com [10.254.159.32]) by irvmail002.ir.intel.com (Postfix) with ESMTP id 53B90369EA; Tue, 5 Dec 2023 11:05:33 +0000 (GMT) From: Przemek Kitszel <przemyslaw.kitszel@intel.com> To: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>, linux-kernel@vger.kernel.org Cc: Jacob Keller <jacob.e.keller@intel.com>, Dwaipayan Ray <dwaipayanray1@gmail.com>, Lukas Bulwahn <lukas.bulwahn@gmail.com>, Rasmus Villemoes <rasmus.villemoes@prevas.dk>, Przemek Kitszel <przemyslaw.kitszel@intel.com> Subject: [PATCH v2] checkpatch: don't complain on _Generic() use Date: Tue, 5 Dec 2023 12:05:24 +0100 Message-Id: <20231205110524.16561-1-przemyslaw.kitszel@intel.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 05 Dec 2023 03:06:02 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784439758736335789 X-GMAIL-MSGID: 1784439758736335789 |
Series |
[v2] checkpatch: don't complain on _Generic() use
|
|
Commit Message
Przemek Kitszel
Dec. 5, 2023, 11:05 a.m. UTC
Improve CamelCase recognition logic to avoid reporting on _Generic() use.
Other C keywords, such as _Bool, are intentionally omitted, as those
should be rather avoided in new source code.
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
---
v2: _Static_assert dropped from the scope;
whole word match.
v1 link: https://lkml.org/lkml/2023/11/27/1055
---
scripts/checkpatch.pl | 2 ++
1 file changed, 2 insertions(+)
base-commit: 3706f141e5639d3034bd83448e929b8462362651
Comments
On 12/5/23 12:05, Przemek Kitszel wrote: > Improve CamelCase recognition logic to avoid reporting on _Generic() use. > > Other C keywords, such as _Bool, are intentionally omitted, as those > should be rather avoided in new source code. > > Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> > --- > v2: _Static_assert dropped from the scope; > whole word match. > > v1 link: https://lkml.org/lkml/2023/11/27/1055 > --- > scripts/checkpatch.pl | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 25fdb7fda112..1370f426949d 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -5839,6 +5839,8 @@ sub process { > #CamelCase > if ($var !~ /^$Constant$/ && > $var =~ /[A-Z][a-z]|[a-z][A-Z]/ && > +#Ignore C keywords > + $var !~ /^_Generic$/ && > #Ignore some autogenerated defines and enum values > $var !~ /^(?:[A-Z]+_){1,5}[A-Z]{1,3}[a-z]/ && > #Ignore Page<foo> variants > > base-commit: 3706f141e5639d3034bd83448e929b8462362651 Hi, could I do anything more to have this patch applied? Przemek
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 25fdb7fda112..1370f426949d 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5839,6 +5839,8 @@ sub process { #CamelCase if ($var !~ /^$Constant$/ && $var =~ /[A-Z][a-z]|[a-z][A-Z]/ && +#Ignore C keywords + $var !~ /^_Generic$/ && #Ignore some autogenerated defines and enum values $var !~ /^(?:[A-Z]+_){1,5}[A-Z]{1,3}[a-z]/ && #Ignore Page<foo> variants