]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: dsa: drop dsa_slave_priv from dsa_slave_change_mtu
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 15 Apr 2022 15:46:25 +0000 (18:46 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Apr 2022 09:34:34 +0000 (10:34 +0100)
We can get a hold of the "ds" pointer directly from "dp", no need for
the dsa_slave_priv.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c

index 3ff8647be619326a52e86fd2de4870f0e886ef0d..bf93d6b386687cd7789f00f4b338483dea96dca7 100644 (file)
@@ -1806,9 +1806,8 @@ int dsa_slave_change_mtu(struct net_device *dev, int new_mtu)
 {
        struct net_device *master = dsa_slave_to_master(dev);
        struct dsa_port *dp = dsa_slave_to_port(dev);
-       struct dsa_slave_priv *p = netdev_priv(dev);
        struct dsa_port *cpu_dp = dp->cpu_dp;
-       struct dsa_switch *ds = p->dp->ds;
+       struct dsa_switch *ds = dp->ds;
        struct dsa_port *other_dp;
        int largest_mtu = 0;
        int new_master_mtu;