Skip to content

Commit

Permalink
net: dsa: sja1105: Unset port from forwarding mask unconditionally on…
Browse files Browse the repository at this point in the history
… fdb_del

This is a cosmetic patch that simplifies the code by removing a
redundant check. A logical AND-with-zero performed on a zero is still
zero.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vladimir Oltean authored and David S. Miller committed Jun 4, 2019
1 parent 1da7382 commit 7752e93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/dsa/sja1105/sja1105_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -903,8 +903,8 @@ int sja1105et_fdb_del(struct dsa_switch *ds, int port,
* need to completely evict the FDB entry.
* Otherwise we just write it back.
*/
if (l2_lookup.destports & BIT(port))
l2_lookup.destports &= ~BIT(port);
l2_lookup.destports &= ~BIT(port);

if (l2_lookup.destports)
keep = true;
else
Expand Down

0 comments on commit 7752e93

Please sign in to comment.