Skip to contentSkip to conversation

net: dsa: sja1105: Unset port from forwarding mask unconditionally on fdb_del

PATCH In review Vladimir Oltean 1 participant 1 message Jun 2, 2019

Subsystems (4)
lore
Share & tools
lore

Vladimir Oltean

author maintainer
#0 lore raw

PATCH 10/11 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.

---
 drivers/net/dsa/sja1105/sja1105_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/dsa/sja1105/sja1105_main.c +2 -2
index 46e2cc7b9ddc..8343dcf48384 100644
@@ -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
Signature · 1 line
2.17.1