[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220516115627.66363-1-guozhengkui@vivo.com>
Date: Mon, 16 May 2022 19:56:25 +0800
From: Guo Zhengkui <guozhengkui@...o.com>
To: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Colin Ian King <colin.king@...el.com>,
Guo Zhengkui <guozhengkui@...o.com>,
Jiasheng Jiang <jiasheng@...as.ac.cn>,
netdev@...r.kernel.org (open list:NETWORKING DRIVERS),
linux-kernel@...r.kernel.org (open list)
Cc: zhengkui_guo@...look.com
Subject: [PATCH linux-next] net: smc911x: replace ternary operator with min()
Fix the following coccicheck warning:
drivers/net/ethernet/smsc/smc911x.c:483:20-22: WARNING opportunity for min()
Signed-off-by: Guo Zhengkui <guozhengkui@...o.com>
---
drivers/net/ethernet/smsc/smc911x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c
index fc9cef9dcefc..2694287770e6 100644
--- a/drivers/net/ethernet/smsc/smc911x.c
+++ b/drivers/net/ethernet/smsc/smc911x.c
@@ -480,7 +480,7 @@ static void smc911x_hardware_send_pkt(struct net_device *dev)
SMC_SET_TX_FIFO(lp, cmdB);
DBG(SMC_DEBUG_PKTS, dev, "Transmitted packet\n");
- PRINT_PKT(buf, len <= 64 ? len : 64);
+ PRINT_PKT(buf, min(len, 64));
/* Send pkt via PIO or DMA */
#ifdef SMC_USE_DMA
--
2.20.1
Powered by blists - more mailing lists