[PATCH] dpaa2-eth: Simplify the calculation of variables
Subsystems:
dpaa2 ethernet driver , networking drivers , the rest
STALE2006d
LANDED
Landed in mainline as b91b3a211542 on 2021-02-06.
3 messages,
3 authors,
2021-02-06 · open the first message on its own page
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 <redacted>
Signed-off-by: Jiapeng Chong <redacted>
---
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
index fb0bcd1..93f84c9 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -1648,7 +1648,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 ;
--
1.8.3.1
On Tue, Feb 02, 2021 at 06:02:37PM +0800, Jiapeng Chong wrote: 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 <redacted>
Signed-off-by: Jiapeng Chong <redacted> Acked-by: Ioana Ciornei <ioana.ciornei@nxp.com>
quoted hunk ---
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
index fb0bcd1..93f84c9 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -1648,7 +1648,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 ;
--
1.8.3.1
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Tue, 2 Feb 2021 18:02:37 +0800 you wrote: 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 <redacted>
Signed-off-by: Jiapeng Chong <redacted>
[...]
Here is the summary with links:
- dpaa2-eth: Simplify the calculation of variables
https://git.kernel.org/netdev/net-next/c/b91b3a211542
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html