diff options
author | Vladimir Oltean <olteanv@gmail.com> | 2019-06-03 00:15:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-04 21:49:20 +0300 |
commit | 7752e937f185a24d8e33dea067726079418574e3 (patch) | |
tree | dca58b62f0efb9d3e887c36bbeaf8ed8ede7d7e1 /drivers/net/dsa/sja1105 | |
parent | 1da73821343c7d733de96de0a44d6d807bda98ce (diff) | |
download | linux-7752e937f185a24d8e33dea067726079418574e3.tar.xz |
net: dsa: sja1105: Unset port from forwarding mask unconditionally on 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>
Diffstat (limited to 'drivers/net/dsa/sja1105')
-rw-r--r-- | drivers/net/dsa/sja1105/sja1105_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c index 46e2cc7b9ddc..8343dcf48384 100644 --- a/drivers/net/dsa/sja1105/sja1105_main.c +++ b/drivers/net/dsa/sja1105/sja1105_main.c @@ -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 |