diff mbox series

[01/11] net: dsa: microchip: ksz8795: remove unused last_port variable

Message ID 20201118220357.22292-2-m.grzeschik@pengutronix.de
State Superseded
Headers show
Series net: dsa: microchip: make ksz8795 driver more dynamic | expand

Commit Message

Michael Grzeschik Nov. 18, 2020, 10:03 p.m. UTC
The variable last_port is not used anywhere, this patch removes it.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 drivers/net/dsa/microchip/ksz8795.c    | 1 -
 drivers/net/dsa/microchip/ksz_common.h | 1 -
 2 files changed, 2 deletions(-)

Comments

Andrew Lunn Nov. 19, 2020, 12:05 a.m. UTC | #1
On Wed, Nov 18, 2020 at 11:03:47PM +0100, Michael Grzeschik wrote:
> The variable last_port is not used anywhere, this patch removes it.
> 
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Florian Fainelli Nov. 19, 2020, 3:06 a.m. UTC | #2
On 11/18/2020 2:03 PM, Michael Grzeschik wrote:
> The variable last_port is not used anywhere, this patch removes it.
> 
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
diff mbox series

Patch

diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c
index 1e101ab56cea113..8a3d2e607283581 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 cf866e48ff664b6..629700a63702435 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;