提交 5ff0348b 编写于 作者: G Guo Zhengkui 提交者: Jakub Kicinski

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: NGuo Zhengkui <guozhengkui@vivo.com>
Link: https://lore.kernel.org/r/20220516115627.66363-1-guozhengkui@vivo.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 ab4d6357
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册