Thread (23 messages) 23 messages, 5 authors, 2026-02-17

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

From: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Date: 2026-02-17 18:35:09
Also in: imx, linux-arm-kernel, linux-arm-msm

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) <redacted>
Reviewed-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>

	Ayaan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help