diff mbox series

[net-next] net: simplify eeecfg_mac_can_tx_lpi

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

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 3 this patch: 3
netdev/build_tools success Errors and warnings before: 0 (+0) this patch: 0 (+0)
netdev/cc_maintainers warning 1 maintainers not CCed: horms@kernel.org
netdev/build_clang success Errors and warnings before: 11 this patch: 11
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 369 this patch: 369
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-11-13--03-00 (tests: 786)

Commit Message

Heiner Kallweit Nov. 12, 2024, 8:36 p.m. UTC
Simplify the function.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 include/net/eee.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Russell King (Oracle) Nov. 12, 2024, 9:19 p.m. UTC | #1
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!
patchwork-bot+netdevbpf@kernel.org Nov. 14, 2024, 3 a.m. UTC | #2
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 mbox series

Patch

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,