[RFC,net-next,03/10] net: stmmac: always fill in ver->userver

Message ID E1wAPBW-0000000F7k0-2Dr7@rmk-PC.armlinux.org.uk (mailing list archive)
State New
Headers
Series net: stmmac: clean up / fix synopsys IP version checks |

Commit Message

Russell King (Oracle) April 8, 2026, 9:26 a.m. UTC
Always fill in ver->userver irrespective of the core type. This has no
functional impact but tidies up the code by removing an unnecessary
conditional.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/net/ethernet/stmicro/stmmac/hwif.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.c b/drivers/net/ethernet/stmicro/stmmac/hwif.c
index 830ff816ab4f..aacf78d4a2ee 100644
--- a/drivers/net/ethernet/stmicro/stmmac/hwif.c
+++ b/drivers/net/ethernet/stmicro/stmmac/hwif.c
@@ -47,8 +47,7 @@  static void stmmac_get_version(struct stmmac_priv *priv,
 		 FIELD_GET(DWMAC_SNPSVER, version));
 
 	ver->snpsver = FIELD_GET(DWMAC_SNPSVER, version);
-	if (core_type == DWMAC_CORE_XGMAC)
-		ver->userver = FIELD_GET(DWMAC_USERVER, version);
+	ver->userver = FIELD_GET(DWMAC_USERVER, version);
 }
 
 static void stmmac_dwmac_mode_quirk(struct stmmac_priv *priv)