diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2024-11-12 21:36:29 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-11-14 03:49:50 +0100 |
commit | 6b998404c71ecff9ebeed343c1ce21f9df3ef131 (patch) | |
tree | d7a37db566fe5fa17fa029e0d5a4204192af906d /include/net/eee.h | |
parent | ynl: samples: Fix the wrong format specifier (diff) | |
download | linux-6b998404c71ecff9ebeed343c1ce21f9df3ef131.tar.xz linux-6b998404c71ecff9ebeed343c1ce21f9df3ef131.zip |
net: simplify eeecfg_mac_can_tx_lpi
Simplify the function.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/f9a4623b-b94c-466c-8733-62057c6d9a17@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/eee.h')
-rw-r--r-- | include/net/eee.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/include/net/eee.h b/include/net/eee.h index 84837aba3cd9..cfab1b8bc46a 100644 --- a/include/net/eee.h +++ b/include/net/eee.h @@ -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, |