Skip to contentSkip to conversation

net: stmmac: move stmmac_mac_finish() after stmmac_mac_config()

PATCH In review Russell King (Oracle) 3 participants 3 messages Nov 21, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: stmmac: move stmmac_mac_finish() after stmmac_mac_config()

Keep the functions and initialisers in the same order that they exist in phylink_mac_ops. This is the preferred order for phylink methods as it arranges the configuration methods by called order.

---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +2 -1
index 970c670fc302..d16e522c1e7d 100644
@@ -932,7 +932,8 @@ static int stmmac_mac_finish(struct phylink_config *config, unsigned int mode,
 	struct stmmac_priv *priv = netdev_priv(ndev);
 
 	if (priv->plat->mac_finish)
-		priv->plat->mac_finish(ndev, priv->plat->bsp_priv, mode, interface);
+		priv->plat->mac_finish(ndev, priv->plat->bsp_priv, mode,
+				       interface);
 
 	return 0;
 }
Signature · 1 line
2.47.3
#1 lore raw

Hi Russell,

Quoted 14 lines · Russell King (Oracle)

Keep the functions and initialisers in the same order that they exist in phylink_mac_ops. This is the preferred order for phylink methods as it arranges the configuration methods by called order.

---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +0 -0
index 970c670fc302..d16e522c1e7d 100644

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c static int stmmac_mac_finish(struct phylink_config *config, unsigned int mode, · line 936

Quoted 6 lines
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +2 -1
@@ -932,7 +932,8 @@ static int stmmac_mac_finish(struct phylink_config *config, unsigned int mode,
 	struct stmmac_priv *priv = netdev_priv(ndev);
 
 	if (priv->plat->mac_finish)
-		priv->plat->mac_finish(ndev, priv->plat->bsp_priv, mode, interface);
+		priv->plat->mac_finish(ndev, priv->plat->bsp_priv, mode,
+				       interface);

This is just a line wrap, I don't really see the connexion with the commit log :( Some missing hunks in the commit maybe ?

Maxime

Quoted 3 lines
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +0 -0
 	return 0;
 }
#2 lore raw
Quoted 19 lines · Maxime Chevallier

Hi Russell,

Quoted 16 lines · Russell King (Oracle)

Keep the functions and initialisers in the same order that they exist in phylink_mac_ops. This is the preferred order for phylink methods as it arranges the configuration methods by called order.

---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +0 -0
index 970c670fc302..d16e522c1e7d 100644
@@ -932,7 +932,8 @@ static int stmmac_mac_finish(struct phylink_config *config, unsigned int mode,
 	struct stmmac_priv *priv = netdev_priv(ndev);
 
Quoted 7 lines

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c static int stmmac_mac_finish(struct phylink_config *config, unsigned int mode, · line 936

Quoted 4 lines
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +2 -1
 	if (priv->plat->mac_finish)
-		priv->plat->mac_finish(ndev, priv->plat->bsp_priv, mode, interface);
+		priv->plat->mac_finish(ndev, priv->plat->bsp_priv, mode,
+				       interface);

This is just a line wrap, I don't really see the connexion with the commit log :( Some missing hunks in the commit maybe ?

Oh, I thought I hadn't sent the patch, but I had... meanwhile I'd updated my local copy to fix the line wrap, forgotten I'd done that, rebased the patch and ended up with a patch with that description but with only the reformatting. Bah. I'll move it out of patchwork.

Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!