Skip to contentSkip to conversation

net: simplify eeecfg_mac_can_tx_lpi

PATCH Applied Heiner Kallweit 3 participants 3 messages Nov 12, 2024 – Nov 14, 2024

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

PATCH 1/1 net: simplify eeecfg_mac_can_tx_lpi

Simplify the function.

---
 include/net/eee.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
include/net/eee.h +1 -4
index 84837aba3..cfab1b8bc 100644
@@ -13,10 +13,7 @@ struct eee_config {
 static inline bool eeecfg_mac_can_tx_lpi(const struct eee_config *eeecfg)
 {
 	/* eee_enabled is the master on/off */
-	if (!eeecfg->eee_enabled || !eeecfg->tx_lpi_enabled)
-		return false;
-
-	return true;
+	return eeecfg->eee_enabled && eeecfg->tx_lpi_enabled;
 }
 
 static inline void eeecfg_to_eee(struct ethtool_keee *eee,
Signature · 1 line
2.47.0
#2 lore raw
In reply to Heiner Kallweit
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 6 lines · On Tue, 12 Nov 2024 21:36:29 +0100 you wrote:

Simplify the function.

---
 include/net/eee.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Here is the summary with links:
- [net-next] net: simplify eeecfg_mac_can_tx_lpi

    https://git.kernel.org/netdev/net-next/c/6b998404c71e

You are awesome, thank you!

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