[PATCH v1 05/18] arm64/sysreg: add PIR*_ELx registers

Mark Brown broonie at kernel.org
Tue Apr 11 05:48:09 PDT 2023


On Mon, Mar 27, 2023 at 01:22:12PM +0100, Catalin Marinas wrote:
> On Thu, Mar 16, 2023 at 05:23:48PM +0000, Mark Brown wrote:
> > On Thu, Mar 09, 2023 at 02:52:33PM +0000, Joey Gouly wrote:

> > > +#define PIRx_ELx_PERMIDX(perm, idx)	((perm) << ((idx) * 4))

> > This is bikeshedding but every time I look at the uses of this macro I
> > find myself trying to read it as index, permission rather than the way
> > it is - that's the order for both assignment statements and #defines in
> > headers so it's what my brain is reaching for.

> You are right, we should probably drop the IDX suffix (or maybe you have
> better suggestion for naming it). It refers to the permission field in
> the PIR* registers.

I'd suggest dropping the IDX and reversing the arguments.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230411/642cca78/attachment-0001.sig>


More information about the linux-arm-kernel mailing list