net: marvell: Use min() instead of doing it manually
Subsystems (3)
PATCH v3 1/1 net: marvell: Use min() instead of doing it manually
Fix following coccicheck warning:
drivers/net/ethernet/marvell/mv643xx_eth.c:1664:35-36: WARNING opportunity for min()
Signed-off-by Haowen Bai <[email protected]>
--- drivers/net/ethernet/marvell/mv643xx_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/mv643xx_eth.c +1 -1
@@ -1661,7 +1661,7 @@ mv643xx_eth_set_ringparam(struct net_device *dev, struct ethtool_ringparam *er,if (er->rx_mini_pending || er->rx_jumbo_pending)return -EINVAL ; - mp->rx_ring_size = er->rx_pending <4096 ? er->rx_pending :4096 ; + mp->rx_ring_size =min (er->rx_pending,4096U ); mp->tx_ring_size = clamp_t(unsigned int, er->tx_pending,MV643XX_MAX_SKB_DESCS *2 ,4096 );if (mp->tx_ring_size != er->tx_pending)
Signature · 1 line
2.7.4
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 7 lines · On Thu, 3 Mar 2022 09:38:49 +0800 you wrote:
Fix following coccicheck warning:
drivers/net/ethernet/marvell/mv643xx_eth.c:1664:35-36: WARNING opportunity formin()Signed-off-by Haowen Bai <[email protected]>--- drivers/net/ethernet/marvell/mv643xx_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [v3] net: marvell: Use min() instead of doing it manually
https://git.kernel.org/netdev/net-next/c/2f5e65de0496
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html