Skip to contentSkip to conversation

net: lan743x: Simplify comparison

PATCH Applied Moritz Fischer 2 participants 2 messages Jun 27, 2023

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

PATCH 1/1 net: lan743x: Simplify comparison

Simplify comparison, no functional changes.

---
 drivers/net/ethernet/microchip/lan743x_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/microchip/lan743x_main.c +1 -1
index 61eadc0bca8b..a36f6369f132 100644
@@ -164,7 +164,7 @@ static int lan743x_csr_wait_for_bit(struct lan743x_adapter *adapter,
 	u32 data;
 
 	return readx_poll_timeout(LAN743X_CSR_READ_OP, offset, data,
-				  target_value == ((data & bit_mask) ? 1 : 0),
+				  target_value == !!(data & bit_mask),
 				  usleep_max, usleep_min * count);
 }
 
Signature · 1 line
2.41.0.178.g377b9f9a00-goog
#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 Tue, 27 Jun 2023 03:54:32 +0000 you wrote:

Simplify comparison, no functional changes.

[...]

Here is the summary with links:
- [net-next] net: lan743x: Simplify comparison

    https://git.kernel.org/netdev/net-next/c/30ac666a2fcc

You are awesome, thank you!

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