[PATCH net-next] net: stmmac: simplify phylink_suspend() and phylink_resume() calls
Simon Horman
horms at kernel.org
Thu Mar 6 01:57:10 PST 2025
On Tue, Mar 04, 2025 at 11:21:27AM +0000, Russell King (Oracle) wrote:
> Currently, the calls to phylink's suspend and resume functions are
> inside overly complex tests, and boil down to:
>
> if (device_may_wakeup(priv->device) && priv->plat->pmt) {
> call phylink
> } else {
> call phylink and
> if (device_may_wakeup(priv->device))
> do something else
> }
>
> This results in phylink always being called, possibly with differing
> arguments for phylink_suspend().
>
> Simplify this code, noting that each site is slightly different due to
> the order in which phylink is called and the "something else".
>
> Reviewed-by: Andrew Lunn <andrew at lunn.ch>
> Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
Reviewed-by: Simon Horman <horms at kernel.org>
More information about the linux-arm-kernel
mailing list