Message ID | f9a4623b-b94c-466c-8733-62057c6d9a17@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 6b998404c71ecff9ebeed343c1ce21f9df3ef131 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] net: simplify eeecfg_mac_can_tx_lpi | expand |
On Tue, Nov 12, 2024 at 09:36:29PM +0100, Heiner Kallweit wrote: > Simplify the function. > > Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Thanks!
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Tue, 12 Nov 2024 21:36:29 +0100 you wrote: > Simplify the function. > > Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> > --- > 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!
diff --git a/include/net/eee.h b/include/net/eee.h index 84837aba3..cfab1b8bc 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,
Simplify the function. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> --- include/net/eee.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)