[PATCH v2 2/2] net: stmmac: remove the useless member phy_mask

Dejin Zheng zhengdejin5 at gmail.com
Tue Jan 7 23:25:50 PST 2020


The value of phy_mask in struct stmmac_mdio_bus_data will be passed
to phy_mask of struct mii_bus before register mdiobus, the mii_bus
was obtained by mdiobus_alloc() and set mii_bus->phy_mask as zero
by default. the stmmac_mdio_bus_data->phy_mask also set zero when
got stmmac_mdio_bus_data by devm_kzalloc(), so doesn't need to pass
the value and remove the useless member phy_mask in the struct
stmmac_mdio_bus_data.

Signed-off-by: Dejin Zheng <zhengdejin5 at gmail.com>
---

Changes since v1:
    add this new commit.

 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 1 -
 include/linux/stmmac.h                            | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index cfe5d8b73142..662b1cde51ae 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -388,7 +388,6 @@ int stmmac_mdio_register(struct net_device *ndev)
 	snprintf(new_bus->id, MII_BUS_ID_SIZE, "%s-%x",
 		 new_bus->name, priv->plat->bus_id);
 	new_bus->priv = ndev;
-	new_bus->phy_mask = mdio_bus_data->phy_mask;
 	new_bus->parent = priv->device;
 
 	err = of_mdiobus_register(new_bus, mdio_node);
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index d4bcd9387136..e9aaa9bfb304 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -79,7 +79,6 @@
 /* Platfrom data for platform device structure's platform_data field */
 
 struct stmmac_mdio_bus_data {
-	unsigned int phy_mask;
 	int *irqs;
 	int probed_phy_irq;
 	bool needs_reset;
-- 
2.17.1




More information about the linux-arm-kernel mailing list