Skip to contentSkip to conversation

lan78xx: remove redundant statement in lan78xx_get_eee

PATCH Applied Heiner Kallweit 2 participants 2 messages Jan 5, 2024 – Jan 9, 2024

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

PATCH 1/1 lan78xx: remove redundant statement in lan78xx_get_eee

eee_active is set by phy_ethtool_get_eee() already, using the same logic plus an additional check against link speed/duplex values. See genphy_c45_eee_is_active() for details.
So we can remove this line.

---
 drivers/net/usb/lan78xx.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/usb/lan78xx.c +0 -2
index 5add4145d..a6d653ff5 100644
@@ -1691,8 +1691,6 @@ static int lan78xx_get_eee(struct net_device *net, struct ethtool_eee *edata)
 	ret = lan78xx_read_reg(dev, MAC_CR, &buf);
 	if (buf & MAC_CR_EEE_EN_) {
 		edata->eee_enabled = true;
-		edata->eee_active = !!(edata->advertised &
-				       edata->lp_advertised);
 		edata->tx_lpi_enabled = true;
 		/* EEE_TX_LPI_REQ_DLY & tx_lpi_timer are same uSec unit */
 		ret = lan78xx_read_reg(dev, EEE_TX_LPI_REQ_DLY, &buf);
Signature · 1 line
2.43.0
#1 lore raw
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 8 lines · On Fri, 5 Jan 2024 23:21:52 +0100 you wrote:

eee_active is set by phy_ethtool_get_eee() already, using the same logic plus an additional check against link speed/duplex values. See genphy_c45_eee_is_active() for details.
So we can remove this line.

[...]

Here is the summary with links:
- [net-next] lan78xx: remove redundant statement in lan78xx_get_eee

    https://git.kernel.org/netdev/net-next/c/9b0f51097147

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html