[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230626093504.1325-1-youkangren@vivo.com>
Date: Mon, 26 Jun 2023 17:35:02 +0800
From: You Kangren <youkangren@...o.com>
To: Kalle Valo <kvalo@...nel.org>, Dongliang Mu <dzm91@...t.edu.cn>,
Simon Horman <simon.horman@...igine.com>,
You Kangren <youkangren@...o.com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
linux-wireless@...r.kernel.org (open list:RAYLINK/WEBGEAR 802.11
WIRELESS LAN DRIVER), linux-kernel@...r.kernel.org (open list)
Cc: opensource.kernel@...o.com
Subject: [PATCH] wifi: ray_cs: Replace the ternary conditional operator with min()
Replace the ternary conditional operator with min() to make the code clean
Signed-off-by: You Kangren <youkangren@...o.com>
---
drivers/net/wireless/legacy/ray_cs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/legacy/ray_cs.c b/drivers/net/wireless/legacy/ray_cs.c
index 8ace797ce951..96f34d90f601 100644
--- a/drivers/net/wireless/legacy/ray_cs.c
+++ b/drivers/net/wireless/legacy/ray_cs.c
@@ -2086,8 +2086,7 @@ static void ray_rx(struct net_device *dev, ray_dev_t *local,
rx_data(dev, prcs, pkt_addr, rx_len);
copy_from_rx_buff(local, (UCHAR *) &local->last_bcn, pkt_addr,
- rx_len < sizeof(struct beacon_rx) ?
- rx_len : sizeof(struct beacon_rx));
+ min(rx_len, sizeof(struct beacon_rx));
local->beacon_rxed = 1;
/* Get the statistics so the card counters never overflow */
--
2.39.0
Powered by blists - more mailing lists