[PATCH RFC net-next 04/10] net: stmmac: use ver->userver and ver->snpsver to print version
Russell King (Oracle)
rmk+kernel at armlinux.org.uk
Wed Apr 8 02:26:59 PDT 2026
Rather than using FIELD_GET() twice, reorder the code to extract the
version fields into struct stmmac_version, and then print them.
Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
---
drivers/net/ethernet/stmicro/stmmac/hwif.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.c b/drivers/net/ethernet/stmicro/stmmac/hwif.c
index aacf78d4a2ee..7f95a2a5be4c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/hwif.c
+++ b/drivers/net/ethernet/stmicro/stmmac/hwif.c
@@ -42,12 +42,11 @@ static void stmmac_get_version(struct stmmac_priv *priv,
return;
}
- dev_info(priv->device, "User ID: 0x%x, Synopsys ID: 0x%x\n",
- FIELD_GET(DWMAC_USERVER, version),
- FIELD_GET(DWMAC_SNPSVER, version));
-
ver->snpsver = FIELD_GET(DWMAC_SNPSVER, version);
ver->userver = FIELD_GET(DWMAC_USERVER, version);
+
+ dev_info(priv->device, "User ID: 0x%x, Synopsys ID: 0x%x\n",
+ ver->userver, ver->snpsver);
}
static void stmmac_dwmac_mode_quirk(struct stmmac_priv *priv)
--
2.47.3
More information about the linux-arm-kernel
mailing list