net: dsa: microchip: ksz8795: remove unused last_port variable
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Tue, 1 Dec 2020 20:44:56 +0000 (21:44 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 3 Dec 2020 01:16:28 +0000 (17:16 -0800)
The variable last_port is not used anywhere, this patch removes it.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/ksz8795.c
drivers/net/dsa/microchip/ksz_common.h

index 1e101ab..8a3d2e6 100644 (file)
@@ -1163,7 +1163,6 @@ static int ksz8795_switch_detect(struct ksz_device *dev)
                        id2 = 0x65;
        } else if (id2 == CHIP_ID_94) {
                dev->port_cnt--;
-               dev->last_port = dev->port_cnt;
                id2 = 0x94;
        }
        id16 &= ~0xff;
index cf866e4..629700a 100644 (file)
@@ -72,7 +72,6 @@ struct ksz_device {
        int reg_mib_cnt;
        int mib_cnt;
        int mib_port_cnt;
-       int last_port;                  /* ports after that not used */
        phy_interface_t compat_interface;
        u32 regs_size;
        bool phy_errata_9477;