Skip to content

Commit

Permalink
net: smc911x: replace ternary operator with min()
Browse files Browse the repository at this point in the history
Fix the following coccicheck warning:

drivers/net/ethernet/smsc/smc911x.c:483:20-22: WARNING opportunity for min()

Signed-off-by: Guo Zhengkui <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
Guo Zhengkui authored and kuba-moo committed May 18, 2022
1 parent ab4d635 commit 5ff0348
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/smsc/smc911x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5ff0348

Please sign in to comment.