Skip to contentSkip to conversation

lan743x: remove redundant statement in lan743x_ethtool_get_eee

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

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

PATCH 1/1 lan743x: remove redundant statement in lan743x_ethtool_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/ethernet/microchip/lan743x_ethtool.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/microchip/lan743x_ethtool.c +0 -1
index 8c4a2bb6a..a2b3f4433 100644
@@ -1077,7 +1077,6 @@ static int lan743x_ethtool_get_eee(struct net_device *netdev,
 	buf = lan743x_csr_read(adapter, MAC_CR);
 	if (buf & MAC_CR_EEE_EN_) {
 		eee->eee_enabled = true;
-		eee->eee_active = !!(eee->advertised & eee->lp_advertised);
 		eee->tx_lpi_enabled = true;
 		/* EEE_TX_LPI_REQ_DLY & tx_lpi_timer are same uSec unit */
 		buf = lan743x_csr_read(adapter, MAC_EEE_TX_LPI_REQ_DLY_CNT);
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:19:02 +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] lan743x: remove redundant statement in lan743x_ethtool_get_eee

    https://git.kernel.org/netdev/net-next/c/5733d139a674

You are awesome, thank you!

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