Re: [PATCH] checkpatch: Ignore attribute macros ending with nGnRnE or nGnRE
From: Joe Perches
Date: Sat Mar 07 2026 - 14:53:14 EST
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)