Skip to contentSkip to conversation

rocker: Simplify the calculation of variables

PATCH Applied Jiapeng Zhong 2 participants 2 messages Jan 26, 2021 – Jan 28, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rocker: Simplify the calculation of variables

Fix the following coccicheck warnings:

./drivers/net/ethernet/rocker/rocker_ofdpa.c:926:34-36: WARNING !A || A && B is equivalent to !A || B.

---
 drivers/net/ethernet/rocker/rocker_ofdpa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/rocker/rocker_ofdpa.c +1 -1
index 7072b24..e2d5962 100644
@@ -923,7 +923,7 @@ static int ofdpa_flow_tbl_bridge(struct ofdpa_port *ofdpa_port,
 	struct ofdpa_flow_tbl_entry *entry;
 	u32 priority;
 	bool vlan_bridging = !!vlan_id;
-	bool dflt = !eth_dst || (eth_dst && eth_dst_mask);
+	bool dflt = !eth_dst || eth_dst_mask;
 	bool wild = false;
 
 	entry = kzalloc(sizeof(*entry), GFP_ATOMIC);
Signature · 1 line
1.8.3.1
#1 lore raw
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 9 lines · On Tue, 26 Jan 2021 16:13:03 +0800 you wrote:

Fix the following coccicheck warnings:

./drivers/net/ethernet/rocker/rocker_ofdpa.c:926:34-36: WARNING !A || A && B is equivalent to !A || B.

[...]

Here is the summary with links:
- rocker: Simplify the calculation of variables

    https://git.kernel.org/netdev/net-next/c/1d96006dccf0

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html