OSDN Git Service

mlxsw: spectrum_switchdev: Remove unused variables
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 12 Feb 2019 23:39:58 +0000 (15:39 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Feb 2019 01:31:30 +0000 (17:31 -0800)
After 1ecb195753a1 ("mlxsw: spectrum_switchdev: Remove getting
PORT_BRIDGE_FLAGS") we are not accessing any driver private data
structure, so the mlxsw_sp_port and mlxsw_sp variables are unused.

Fixes: 1ecb195753a1 ("mlxsw: spectrum_switchdev: Remove getting PORT_BRIDGE_FLAGS")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c

index 4c5780f..1f492b7 100644 (file)
@@ -434,9 +434,6 @@ static void mlxsw_sp_bridge_vlan_put(struct mlxsw_sp_bridge_vlan *bridge_vlan)
 static int mlxsw_sp_port_attr_get(struct net_device *dev,
                                  struct switchdev_attr *attr)
 {
-       struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev);
-       struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp;
-
        switch (attr->id) {
        case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT:
                attr->u.brport_flags_support = BR_LEARNING | BR_FLOOD |