From: Michael Grzeschik Date: Tue, 1 Dec 2020 20:44:56 +0000 (+0100) Subject: net: dsa: microchip: ksz8795: remove unused last_port variable X-Git-Tag: accepted/tizen/unified/20230118.172025~8321^2~131^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=453aa4cd7edfa9117a57a20d96a875d815251156;p=platform%2Fkernel%2Flinux-rpi.git net: dsa: microchip: ksz8795: remove unused last_port variable The variable last_port is not used anywhere, this patch removes it. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c index 1e101ab..8a3d2e6 100644 --- a/drivers/net/dsa/microchip/ksz8795.c +++ b/drivers/net/dsa/microchip/ksz8795.c @@ -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; diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index cf866e4..629700a 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -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;