lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230627035432.1296760-1-moritzf@google.com>
Date: Tue, 27 Jun 2023 03:54:32 +0000
From: Moritz Fischer <moritzf@...gle.com>
To: netdev@...r.kernel.org
Cc: pabeni@...hat.com, kuba@...nel.org, edumazet@...gle.com, 
	davem@...emloft.net, bryan.whitehead@...rochip.com, 
	UNGLinuxDriver@...rochip.com, mdf@...nel.org, 
	Moritz Fischer <moritzf@...gle.com>
Subject: [PATCH net-next] net: lan743x: Simplify comparison

Simplify comparison, no functional changes.

Cc: Bryan Whitehead <bryan.whitehead@...rochip.com>
Cc: UNGLinuxDriver@...rochip.com
Suggested-by: Jakub Kicinski <kuba@...nel.org>
Signed-off-by: Moritz Fischer <moritzf@...gle.com>
---
 drivers/net/ethernet/microchip/lan743x_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 61eadc0bca8b..a36f6369f132 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -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);
 }
 
-- 
2.41.0.178.g377b9f9a00-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ