2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-10 22:54:11 +08:00

dpaa2-eth: Simplify the calculation of variables

Fix the following coccicheck warnings:

./drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:1651:36-38: WARNING
!A || A && B is equivalent to !A || B.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Acked-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/1612260157-128026-1-git-send-email-jiapeng.chong@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jiapeng Chong 2021-02-02 18:02:37 +08:00 committed by Jakub Kicinski
parent c90597bdeb
commit b91b3a2115

View File

@ -1660,7 +1660,7 @@ set_cgtd:
* CG taildrop threshold, so it won't interfere with it; we also * CG taildrop threshold, so it won't interfere with it; we also
* want frames in non-PFC enabled traffic classes to be kept in check) * want frames in non-PFC enabled traffic classes to be kept in check)
*/ */
td.enable = !tx_pause || (tx_pause && pfc); td.enable = !tx_pause || pfc;
if (priv->rx_cgtd_enabled == td.enable) if (priv->rx_cgtd_enabled == td.enable)
return; return;