diff options
author | Guo Zhengkui <guozhengkui@vivo.com> | 2022-05-16 19:56:25 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-05-17 17:39:55 -0700 |
commit | 5ff0348b7f755aac2770bbfc244f5371e4e55224 (patch) | |
tree | d97203e8499cfa430db077f1a0c941b70891b441 | |
parent | ab4d6357c95f5aa6473cc39382271916091378e3 (diff) | |
download | linux-5ff0348b7f755aac2770bbfc244f5371e4e55224.tar.gz linux-5ff0348b7f755aac2770bbfc244f5371e4e55224.tar.bz2 linux-5ff0348b7f755aac2770bbfc244f5371e4e55224.zip |
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@vivo.com>
Link: https://lore.kernel.org/r/20220516115627.66363-1-guozhengkui@vivo.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/smsc/smc911x.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |