diff options
author | Jiapeng Zhong <abaci-bugfix@linux.alibaba.com> | 2021-01-26 11:13:03 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-28 04:35:48 +0300 |
commit | 1d96006dccf0994dd91f327f59493afd6398b01d (patch) | |
tree | ed70e6128f14cf198dccabcb522cb65ec9b1e9d4 /drivers/net/ethernet/rocker | |
parent | 864e898ba3f6a7974d35efb604a1345d50e45f91 (diff) | |
download | linux-1d96006dccf0994dd91f327f59493afd6398b01d.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/rocker')
-rw-r--r-- | drivers/net/ethernet/rocker/rocker_ofdpa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/rocker/rocker_ofdpa.c b/drivers/net/ethernet/rocker/rocker_ofdpa.c index d067da1ef070..967a634ee9ac 100644 --- a/drivers/net/ethernet/rocker/rocker_ofdpa.c +++ b/drivers/net/ethernet/rocker/rocker_ofdpa.c @@ -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); |