summaryrefslogtreecommitdiff
path: root/net/dsa/legacy.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-10-26 17:05:04 +0900
committerDavid S. Miller <davem@davemloft.net>2017-10-26 17:05:04 +0900
commit95fa7a05677e425e175cbca724acb03f15449a7a (patch)
treef2e7f6bb100b80fe2784825f7d50cc1955e86fd1 /net/dsa/legacy.c
parentc3c9f441d82f0f1a1a8841201fe5ad6f9cddd040 (diff)
parenteaac97466ee4e0ab6ed67afbf9fc400862e64986 (diff)
Merge branch 'dsa-dont-unmask-port-bitmaps'
Vivien Didelot says: ==================== net: dsa: don't unmask port bitmaps DSA has several bitmaps to store the type of ports: cpu_port_mask, dsa_port_mask and enabled_port_mask. But the code is inconsistently unmasking them. The legacy code tries to unmask cpu_port_mask and dsa_port_mask but skips enabled_port_mask. The new bindings unmasks cpu_port_mask and enabled_port_mask but skips dsa_port_mask. In fact there is no need to unmask them because we are in the error path, and they won't be used after. Instead of fixing the unmasking, simply remove them. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/legacy.c')
-rw-r--r--net/dsa/legacy.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/net/dsa/legacy.c b/net/dsa/legacy.c
index b6c88fd33d4f..93c1c43bcc58 100644
--- a/net/dsa/legacy.c
+++ b/net/dsa/legacy.c
@@ -272,10 +272,6 @@ static void dsa_switch_destroy(struct dsa_switch *ds)
if (!(dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port)))
continue;
dsa_cpu_dsa_destroy(&ds->ports[port]);
-
- /* Clearing a bit which is not set does no harm */
- ds->cpu_port_mask |= ~(1 << port);
- ds->dsa_port_mask |= ~(1 << port);
}
if (ds->slave_mii_bus && ds->ops->phy_read)