[PATCH RFC net-next 2/9] net: stmmac: qcom-ethqos: remove register field value obfuscations

Mohd Ayaan Anwar mohd.anwar at oss.qualcomm.com
Tue Feb 17 10:35:00 PST 2026


On Thu, Feb 12, 2026 at 12:17:51AM +0000, Russell King (Oracle) wrote:
> Convert the register field values to something more human readable.
> 
> For example, using (BIT(29) | BIT(27)) to update a register field that
> consists of bits 29:27 is an obfuscated way of writing decimal 5 for
> this field. The comment above needs to explain that this value is 5.
> 
> Worse still is BIT(12) | GENMASK(9, 8), which is used to hide the
> decimal value 19 for the bitfield 16:8.
> 
> Fix these, and a few others by using FIELD_PREP(). While it means we
> have bare numeric constants, this is more preferable than having the
> obfuscation.
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>

Reviewed-by: Mohd Ayaan Anwar <mohd.anwar at oss.qualcomm.com>

	Ayaan



More information about the linux-arm-kernel mailing list