net: stmmac: Use max() instead of doing it manually
Subsystems (4)
PATCH v2 1/1 net: stmmac: Use max() instead of doing it manually
Fix following coccicheck warning:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2806:42-43: WARNING opportunity for max()
Signed-off-by Haowen Bai <[email protected]>
--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +1 -2
@@ -2803,8 +2803,8 @@ static void stmmac_dma_interrupt(struct stmmac_priv *priv) {u32 tx_channel_count = priv->plat->tx_queues_to_use;u32 rx_channel_count = priv->plat->rx_queues_to_use; -u32 channels_to_check = tx_channel_count > rx_channel_count ? - tx_channel_count : rx_channel_count; +u32 channels_to_check =max (tx_channel_count, rx_channel_count);u32 chan;int status[max_t (u32,MTL_MAX_TX_QUEUES ,MTL_MAX_RX_QUEUES )];
Signature · 1 line
2.7.4