net: stmmac: remove write-only priv->speed
Subsystems (4)
PATCH 1/1 net: stmmac: remove write-only priv->speed
priv->speed is only ever written to in two locations, but never read. Therefore, it serves no useful purpose. Remove this unnecessary struct member.
Signed-off-by Russell King (Oracle) <[email protected]>
--- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 - drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 --- 2 files changed, 4 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac.h +0 -1
@@ -282,7 +282,6 @@ struct stmmac_priv {/* Generic channel for NAPI */ struct stmmac_channel channel[STMMAC_CH_MAX ]; -int speed;unsigned int pause_time;struct mii_bus *mii;
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +0 -3
@@ -1029,8 +1029,6 @@ static void stmmac_mac_link_up(struct phylink_config *config, } } - priv->speed = speed; -if (priv->plat->fix_mac_speed) priv->plat->fix_mac_speed (priv->plat->bsp_priv, speed, mode);
@@ -7859,7 +7857,6 @@ int stmmac_suspend(struct device *dev)if (stmmac_fpe_supported (priv))timer_shutdown_sync (&priv->fpe_cfg.verify_timer); - priv->speed =SPEED_UNKNOWN ;return 0 ; }EXPORT_SYMBOL_GPL (stmmac_suspend);
Signature · 1 line
2.30.2
Quoted 5 lines · Russell King (Oracle)
priv->speedis only ever written to in two locations, but never read. Therefore, it serves no useful purpose. Remove this unnecessary struct member.Signed-off-by Russell King (Oracle) <[email protected]>
Reviewed-by Andrew Lunn <[email protected]>
Andrew
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Fri, 07 Mar 2025 00:11:29 +0000 you wrote:
priv->speedis only ever written to in two locations, but never read. Therefore, it serves no useful purpose. Remove this unnecessary struct member.Signed-off-by Russell King (Oracle) <[email protected]>--- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 - drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 --- 2 files changed, 4 deletions(-)
Here is the summary with links:
- [net-next] net: stmmac: remove write-only priv->speed
https://git.kernel.org/netdev/net-next/c/64fdb808660d
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html