summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/microchip/ksz_common.h
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2023-05-26 10:34:43 +0300
committerPaolo Abeni <pabeni@redhat.com>2023-05-30 10:48:17 +0300
commitbb4609d27f89cf6d4c6021690c02a10a94719464 (patch)
tree634f75f0064ac46325ec31d5477a83aa42bc438f /drivers/net/dsa/microchip/ksz_common.h
parentb8311f46c6f5a2030f43c764e742015867293493 (diff)
downloadlinux-bb4609d27f89cf6d4c6021690c02a10a94719464.tar.xz
net: dsa: microchip: remove ksz_port:on variable
The only place where this variable would be set to false is the ksz8_config_cpu_port() function. But it is done in a bogus way: for (i = 0; i < dev->phy_port_cnt; i++) { if (i == dev->phy_port_cnt) <--- will be never executed. break; p->on = 1; So, we never have a situation where p->on = 0. In this case, we can just remove it. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.h')
-rw-r--r--drivers/net/dsa/microchip/ksz_common.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h
index f45f5fe11bde..5aa58aac3e07 100644
--- a/drivers/net/dsa/microchip/ksz_common.h
+++ b/drivers/net/dsa/microchip/ksz_common.h
@@ -108,7 +108,6 @@ struct ksz_port {
int stp_state;
struct phy_device phydev;
- u32 on:1; /* port is not disabled by hardware */
u32 fiber:1; /* port is fiber */
u32 force:1;
u32 read:1; /* read MIB counters in background */