Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Link: https://lore.kernel.org/r/1611648783-3916-1-git-send-email-abaci-bugfix@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Jiapeng Zhong and committed by
Jakub Kicinski
1d96006d 864e898b

+1 -1
+1 -1
drivers/net/ethernet/rocker/rocker_ofdpa.c
··· 923 923 struct ofdpa_flow_tbl_entry *entry; 924 924 u32 priority; 925 925 bool vlan_bridging = !!vlan_id; 926 - bool dflt = !eth_dst || (eth_dst && eth_dst_mask); 926 + bool dflt = !eth_dst || eth_dst_mask; 927 927 bool wild = false; 928 928 929 929 entry = kzalloc(sizeof(*entry), GFP_ATOMIC);