Commit b91b3a21 authored by Jiapeng Chong's avatar Jiapeng Chong Committed by Jakub Kicinski

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: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Acked-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/1612260157-128026-1-git-send-email-jiapeng.chong@linux.alibaba.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c90597bd
......@@ -1660,7 +1660,7 @@ void dpaa2_eth_set_rx_taildrop(struct dpaa2_eth_priv *priv,
* 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)
*/
td.enable = !tx_pause || (tx_pause && pfc);
td.enable = !tx_pause || pfc;
if (priv->rx_cgtd_enabled == td.enable)
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment