netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] drivers:atlx:Use max macro
@ 2024-08-22  7:50 Yang Ruibin
  2024-08-22  9:40 ` Yang Ruibin
  0 siblings, 1 reply; 3+ messages in thread
From: Yang Ruibin @ 2024-08-22  7:50 UTC (permalink / raw)
  To: Chris Snook, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Yang Ruibin, Stephen Rothwell, netdev, linux-kernel
  Cc: opensource.kernel

Instead of using the max() implementation of
the ternary operator, use real macros.

Signed-off-by: Yang Ruibin <11162571@vivo.com>
---
 drivers/net/ethernet/atheros/atlx/atl2.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c
index fa9a4919f..3ff669e72 100644
--- a/drivers/net/ethernet/atheros/atlx/atl2.c
+++ b/drivers/net/ethernet/atheros/atlx/atl2.c
@@ -2971,10 +2971,7 @@ static void atl2_check_options(struct atl2_adapter *adapter)
 #endif
 	/* init RXD Flow control value */
 	adapter->hw.fc_rxd_hi = (adapter->rxd_ring_size / 8) * 7;
-	adapter->hw.fc_rxd_lo = (ATL2_MIN_RXD_COUNT / 8) >
-		(adapter->rxd_ring_size / 12) ? (ATL2_MIN_RXD_COUNT / 8) :
-		(adapter->rxd_ring_size / 12);
-
+	adapter->hw.fc_rxd_lo = max(ATL2_MIN_RXD_COUNT / 8, adapter->rxd_ring_size / 12);
 	/* Interrupt Moderate Timer */
 	opt.type = range_option;
 	opt.name = "Interrupt Moderate Timer";
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-22 12:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-22  7:50 [PATCH v1] drivers:atlx:Use max macro Yang Ruibin
2024-08-22  9:40 ` Yang Ruibin
2024-08-22 12:53   ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).