Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp632274lqo; Thu, 16 May 2024 17:38:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU+4J043L6V4HbLcUjOepUIn+oKiaUHCblT1FNHQOwCr8lZKBIxo2TbpvRZ5flewx6CcPOO91zIGnRBMfr7TdyHeCClmC4Vg58+8b3XvA== X-Google-Smtp-Source: AGHT+IEGp6quPMe3UCLMUww0aShNlIA1hGsZaRqGOwfkcdPk8VwXGS2lfbwNT3z+ryueRMo/g0HP X-Received: by 2002:a17:906:40c:b0:a59:dd90:baeb with SMTP id a640c23a62f3a-a5a2d641583mr1445231966b.48.1715906292598; Thu, 16 May 2024 17:38:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715906292; cv=pass; d=google.com; s=arc-20160816; b=d7eNol5knKuqqYZGzxetYWxdlXmUm7upgvjtxyeIj5luOr8yX5LpkN/c+mfRETsKTw KaG+0jJrd9lvRtrM940bldcSGyqr072ggsd0BrwxtQ23uDBhqVg870/qpQcJtKnzEsFA p3ArsLRq7Z78hnkoSRlCY9yH1nZ/snlZlNSOC0pVtlRHZ/VhJp/Z7HwEk79qjEBiMqYt eAjUIWtSTXIMRvAOuqH7N2qOCaejxKX3gHdUi+njca8mrg8tWfrkDo07OheSZucSPC1I DeyhUdFAPFZmEUPPnRCBb23Ck0jgew/Oe6qbLwkbFoXmU1yK2qtKf0o3XSWUJV2V2Gyq mZTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id; bh=+dSDv+WI1aCymrRrw/inU3NC1KEkE3pjYa4cicj1+Oo=; fh=CGmDq96sj6YCCmVxPXanSf2DUm8r0BDTadtH8swJRp4=; b=w0r8Zq3PZdWjlbHuMBt2OxK0OuXqNn2eKaPkNUi5blGYhmyUVQ3C2GuluTWSo16llR Ju3S+jHC3IhTsyAqOHsGzxBdjQoGLYh2548McgoWyvn3U78rZtoigIYLOhpSM1pa0+a0 5tXEWxZkGGaKkMOYFwknvmdwb3cNBnk0ZehtDhxEBC5i/ej008EbVvhL3Y3xPsN7Yoxe fxmubTAMq95yv1L75wI3yT4CK99hqbX4Ci3ZWyBG4QyLEbyjLlPP1O/WmypqUMOnWE89 2gsf19QPKrJH/cWpa8z5mX1kuhpa84oTm2hUAputqUTdmRN59X0yWCdXX2n0BJ2xqk49 4qqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=perches.com); spf=pass (google.com: domain of linux-kernel+bounces-181657-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181657-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17ba4f82si861978566b.625.2024.05.16.17.38.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 17:38:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181657-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=perches.com); spf=pass (google.com: domain of linux-kernel+bounces-181657-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181657-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F3F6A1F2297B for ; Fri, 17 May 2024 00:38:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E34197490; Fri, 17 May 2024 00:37:47 +0000 (UTC) Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5DA23D7A for ; Fri, 17 May 2024 00:37:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.40.44.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715906267; cv=none; b=bQ6DmKZ2zvKaVn9L3mvIbgUDzfMOKibHKiGSzSXLJAWnyvYWfVvEy2ODSh+Dte3Ed9EdJ56zDmplFDyr46iFB5GbWe7blmQD+EjQUsaFQviZMH2I6DCngFcnHwCHwp0ZRpnHwM3VOGfkPwGFS0W5U+Cuv+RffAbHbRTrLfsYnhY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715906267; c=relaxed/simple; bh=2u2tbuWm344b7cQ1Bv8npkVNBQ2eJyK/GjFXIF1Ravo=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=cFbMtZQaGxNjPGTAyG8p/9qevUjTOX50a/kkX89DMlofs+n7ltwMi/mzPvFxhVpzjXJ0pyWIlM7X0IT/Zq0VJVKYlPOwo0BTN2RplxzSTPTJedRN93EylcTxf1tnWNn3LjyOaqERCiXmq08WqMCUDdsEh4FD/ynaHsTec2ZyVOE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com; spf=pass smtp.mailfrom=perches.com; arc=none smtp.client-ip=216.40.44.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=perches.com Received: from omf20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 29D99161D3B; Fri, 17 May 2024 00:37:44 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf20.hostedemail.com (Postfix) with ESMTPA id D1E1D20026; Fri, 17 May 2024 00:37:40 +0000 (UTC) Message-ID: <045de91c8b8e6c8ca60b2c4baf4430bd5cd5eeea.camel@perches.com> Subject: Re: [PATCH 1/1] checkpatch: allow multi-statement declarative macros. From: Joe Perches To: jim.cromie@gmail.com Cc: linux-kernel@vger.kernel.org, akpm@linuxfoundation.org, Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn Date: Thu, 16 May 2024 17:37:39 -0700 In-Reply-To: References: <20240516141418.25345-1-jim.cromie@gmail.com> <4a77b3a77db293acba504914af220d8b8d644616.camel@perches.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: D1E1D20026 X-Stat-Signature: sy3eqq9ptsyt36cdswt3eeq5dr3heyok X-Rspamd-Server: rspamout05 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19mJWOBsuitzZoFDDdKKFe0rs6zwYgxyR8= X-HE-Tag: 1715906260-918204 X-HE-Meta: U2FsdGVkX1+b4uAbfptnZ0OjIR+CM5A6IiIKvrqtFBOgidIqO4OS2/S1DJCSkY1MuW6z0wabdYFENQWNTTHUknWm81onCFvnluL7HNij21An9jqtfTMT8pmyGGFXYZxyVgqa6UTiJu5NV/dZZFT9khbzJef3bkfUE/PR+wmIcICx0IWT/VVN9vzJQn/ltY8QnQbubh63e/wVTBnmXMl9b+mGHWquJtmtq/Ww/mXtbO+KoWxsqsU+4i9FYfUkbfxM8VYrqs3dejbFo9KCIRjideVJdwryNYyeNjLh9iUrSO23nJf20OCkFmDl0Q266xTujDWBHstC3BlcAgT0t6q5X9Bydjq8yDpEuVZGPZHqYgHTWuqHzd62QD92suNfKXY/CEnZXn4omBinoXy2lm+Wfg== On Thu, 2024-05-16 at 09:20 -0600, jim.cromie@gmail.com wrote: > On Thu, May 16, 2024 at 8:43=E2=80=AFAM Joe Perches wro= te: > >=20 > > On Thu, 2024-05-16 at 08:14 -0600, Jim Cromie wrote: > > > Declarative macros, which declare/define storage (at either file or > > > function scope), cannot be wrapped in do-while statements. So > > > checkpatch advice is incorrect here. > > >=20 > > > The code has an $exceptions regex which allows multiple statements > > > based on the macro name, etc; /DECLARE_PER_CPU|DEFINE_PER_CPU/ are > > > currently accepted, widen those to accept /DECLARE|DEFINE/. > >=20 > > It seems this exempts too large a number of these macros > >=20 > > $ git grep -P '^\s*\#\s*define\s+\w*(?:DECLARE|DEFINE)\w*'|wc -l > > 5075 > >=20 >=20 > wow, thats more than Id have thought. >=20 > > How about somehow limiting these exemptions more strictly? >=20 > agreed. I'll just add my 1 exceptional macro name. > resending shortly. Is this macro used in a lot of places? Otherwise, why not just ignore the macro where it occurs?