]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: dsa: microchip: remove unused members in ksz_device
authorArun Ramadoss <arun.ramadoss@microchip.com>
Tue, 17 May 2022 09:43:33 +0000 (15:13 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 May 2022 11:51:00 +0000 (12:51 +0100)
The name, regs_size and overrides members in struct ksz_device are
unused. Hence remove it.
And host_mask is used in only place of ksz8795.c file, which can be
replaced by dev->info->cpu_ports

Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz8795.c
drivers/net/dsa/microchip/ksz_common.h

index 9d6d3c69fd47c9f877e8186c34ea7db9d49a2f2b..12a599d5e61a44b7edab4eb79fbec499e5221b9c 100644 (file)
@@ -1360,7 +1360,7 @@ static int ksz8_setup(struct dsa_switch *ds)
        ether_addr_copy(alu.mac, eth_stp_addr);
        alu.is_static = true;
        alu.is_override = true;
-       alu.port_forward = dev->host_mask;
+       alu.port_forward = dev->info->cpu_ports;
 
        ksz8_w_sta_mac_table(dev, 0, &alu);
 
@@ -1476,7 +1476,6 @@ static int ksz8_switch_init(struct ksz_device *dev)
        dev->ds->ops = &ksz8_switch_ops;
 
        dev->cpu_port = fls(dev->info->cpu_ports) - 1;
-       dev->host_mask = dev->info->cpu_ports;
        dev->phy_port_cnt = dev->info->port_cnt - 1;
        dev->port_mask = (BIT(dev->phy_port_cnt) - 1) | dev->info->cpu_ports;
 
index de963f0f83e2883103c804d783078fc989cf81d0..8500eaedad67a6feeef1d66d48fa7d6c5ecf8218 100644 (file)
@@ -73,7 +73,6 @@ struct ksz_port {
 struct ksz_device {
        struct dsa_switch *ds;
        struct ksz_platform_data *pdata;
-       const char *name;
        const struct ksz_chip_data *info;
 
        struct mutex dev_mutex;         /* device access */
@@ -94,7 +93,6 @@ struct ksz_device {
        int cpu_port;                   /* port connected to CPU */
        int phy_port_cnt;
        phy_interface_t compat_interface;
-       u32 regs_size;
        bool synclko_125;
        bool synclko_disable;
 
@@ -106,8 +104,6 @@ struct ksz_device {
        u16 mirror_rx;
        u16 mirror_tx;
        u32 features;                   /* chip specific features */
-       u32 overrides;                  /* chip functions set by user */
-       u16 host_mask;
        u16 port_mask;
 };