From mboxrd@z Thu Jan 1 00:00:00 1970 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 13926329367 for ; Sat, 7 Mar 2026 19:53:07 +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=1772913189; cv=none; b=REueSdduIugSeAZH9kDWqLMGMFW25oE/Dy1kTDHZCRAZp1aHQydOrMNxAOATQv1h0WrEFjQlLADpPegg6kxa0Aw0EaKS6VEe6QbP8x++jPgG6GDtLZNVcgwzZFe17XOTFol83YWRR7zamteqBZ5GUrHe2CBJ6pcDp/EIffWfjBc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772913189; c=relaxed/simple; bh=wreg4PcigDXQOD0XdnTsq5+0gJkICHRSYVoPcLd0zxY=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=V/n0fR19j0a9nFEeyIYF9+zfIJDp2DaoaRCsQXT5OyFl0VDfwLEe3LgLn3RpyFz58PqyygLEL5uPK9Zb5sd4EyNVEREnIsLFlZ7aPu8a+vLK9eFC0gP8QLJEtHeyksHxaLFtk4cHtheiuzfe3ci+ELj/v1FkWM2eQKP7DQ1oVaw= 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 omf05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id E13521A0152; Sat, 7 Mar 2026 19:53:06 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf05.hostedemail.com (Postfix) with ESMTPA id C99672000D; Sat, 7 Mar 2026 19:53:04 +0000 (UTC) Message-ID: <0168b7ac87d9bcd0a65f6ffad50816201719d4e3.camel@perches.com> Subject: Re: [PATCH] checkpatch: Ignore attribute macros ending with nGnRnE or nGnRE From: Joe Perches To: Liu Dalin , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn Cc: linux-kernel@vger.kernel.org Date: Sat, 07 Mar 2026 11:53:03 -0800 In-Reply-To: <1108F81575ADF445+20260307072754.111843-1-liudalin@kylinsec.com.cn> References: <1108F81575ADF445+20260307072754.111843-1-liudalin@kylinsec.com.cn> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 (3.58.3-1.fc43) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamout07 X-Rspamd-Queue-Id: C99672000D X-Stat-Signature: 1qmuyyk7gg4popansuwxmsfyk9izciyf X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1+adCK38wEv7E97OyHWOPwMptMJzKITftc= X-HE-Tag: 1772913184-489562 X-HE-Meta: U2FsdGVkX1/ztFgtAYt2hPc71aDfVtl47fYsdfbfuBQF5/m8gMiIS+Aa7lqFflf0rk4JSc7Q9bbTkumB7xxiBfu7gpj1ViYnLPUC+ulooRpWVFA6zNVOUGUN2n29lfbgVYfvV4YC5zdG1oxS9OL19z/QNeQyWHV/F0ub0KdLT74hjAKycG1s22vZqQk9SLSYbO+4OLmeImP43uhSrQrnyyDMwZ2jsIC4oQxR6r8epD0dMteBE4OzZmNNy4esVZQqB/9/sj2xmnclMVdMNiOsLynFxT8iv6cxFk/FO05iVSB2vt8W2e51YpB8dDlnGsqw On Sat, 2026-03-07 at 15:27 +0800, Liu Dalin wrote: > On arm and arm64 platforms, there are several attribute macros that > end with nGnRnE or nGnRE, such as PROT_DEVICE_nGnRnE, PROT_DEVICE_nGnRE, > MT_DEVICE_nGnRnE, and MT_DEVICE_nGnRE. + $var !~ /^[A-Z0-9_]+_(nGnRnE|nGnRE)$/) { Maybe better if you add nGRE too and no capture group using (?:...)$ FYI: These appear unused to date: $ git grep FFA_DEV include/linux/arm_ffa.h:#define FFA_DEV_nGnRnE (0 << 2) include/linux/arm_ffa.h:#define FFA_DEV_nGnRE (1 << 2) include/linux/arm_ffa.h:#define FFA_DEV_nGRE (2 << 2) include/linux/arm_ffa.h:#define FFA_DEV_GRE (3 << 2)