[PATCH net-next v2 15/17] net: stmmac: remove unnecessary EEE handling in stmmac_release()
Andrew Lunn
andrew at lunn.ch
Mon Jan 6 09:06:59 PST 2025
On Mon, Jan 06, 2025 at 12:26:00PM +0000, Russell King (Oracle) wrote:
> phylink_stop() will cause phylink to call the mac_link_down() operation
> before phylink_stop() returns. As mac_link_down() will call
> stmmac_eee_init(false), this will set both priv->eee_active and
> priv->eee_enabled to be false, deleting the eee_ctrl_timer if
> priv->eee_enabled was previously set.
>
> As stmmac_release() calls phylink_stop() before checking whether
> priv->eee_enabled is true, this is a condition that can never be
> satisfied, and thus the code within this if() block will never be
> executed. Remove it.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew at lunn.ch>
Andrew
More information about the linux-arm-kernel
mailing list