net: dsa: microchip: remove unused private members
Private structure members live_ports, on_ports, rx_ports, tx_ports are initialized but not used anywhere. Let's remove them. Suggested-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
143a102e30
commit
b20a6b29a8
@@ -452,15 +452,6 @@ static void ksz9477_port_stp_state_set(struct dsa_switch *ds, int port,
|
||||
ksz_pwrite8(dev, port, P_STP_CTRL, data);
|
||||
p->stp_state = state;
|
||||
mutex_lock(&dev->dev_mutex);
|
||||
if (data & PORT_RX_ENABLE)
|
||||
dev->rx_ports |= (1 << port);
|
||||
else
|
||||
dev->rx_ports &= ~(1 << port);
|
||||
if (data & PORT_TX_ENABLE)
|
||||
dev->tx_ports |= (1 << port);
|
||||
else
|
||||
dev->tx_ports &= ~(1 << port);
|
||||
|
||||
/* Port membership may share register with STP state. */
|
||||
if (member >= 0 && member != p->member)
|
||||
ksz9477_cfg_port_member(dev, port, (u8)member);
|
||||
@@ -1268,18 +1259,10 @@ static void ksz9477_port_setup(struct ksz_device *dev, int port, bool cpu_port)
|
||||
p->phydev.duplex = 1;
|
||||
}
|
||||
mutex_lock(&dev->dev_mutex);
|
||||
if (cpu_port) {
|
||||
if (cpu_port)
|
||||
member = dev->port_mask;
|
||||
dev->on_ports = dev->host_mask;
|
||||
dev->live_ports = dev->host_mask;
|
||||
} else {
|
||||
else
|
||||
member = dev->host_mask | p->vid_member;
|
||||
dev->on_ports |= (1 << port);
|
||||
|
||||
/* Link was detected before port is enabled. */
|
||||
if (p->phydev.link)
|
||||
dev->live_ports |= (1 << port);
|
||||
}
|
||||
mutex_unlock(&dev->dev_mutex);
|
||||
ksz9477_cfg_port_member(dev, port, member);
|
||||
|
||||
@@ -1400,9 +1383,7 @@ static const struct dsa_switch_ops ksz9477_switch_ops = {
|
||||
.phy_read = ksz9477_phy_read16,
|
||||
.phy_write = ksz9477_phy_write16,
|
||||
.phylink_mac_link_down = ksz_mac_link_down,
|
||||
.phylink_mac_link_up = ksz_mac_link_up,
|
||||
.port_enable = ksz_enable_port,
|
||||
.port_disable = ksz_disable_port,
|
||||
.get_strings = ksz9477_get_strings,
|
||||
.get_ethtool_stats = ksz_get_ethtool_stats,
|
||||
.get_sset_count = ksz_sset_count,
|
||||
|
Reference in New Issue
Block a user