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) --- 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