[PATCH 3/6] arm64/sysreg: Allow enumerations to be declared as signed

Mark Brown broonie at kernel.org
Fri Dec 9 05:55:22 PST 2022


On Fri, Dec 09, 2022 at 12:34:28PM +0000, Mark Rutland wrote:

> In future we might want to be explicit about which enums are unsigned feature
> enums, and which are "just" enums without any ordering of values or sign (e.g.
> CTR_EL0.L1Ip). i.e. we might want to explciitly add an `UnsignedEnum`, and have
> plain `Enum` not define a <reg>_<field>_SIGN definition.

That makes sense, I'll add UnsignedEnum.

> Minor nit: since <reg>_<field>_SIGN is a boolean, it'd make more sense for that
> to be named <reg>_<field>_SIGNED.

Right, I think I'd picked the field name in the code before I seen what
FTR_SIGNED/FTR_UNSIGNED actually resolved to.
-------------- 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/20221209/d268f734/attachment.sig>


More information about the linux-arm-kernel mailing list