[RFC/RFT,net-next,4/4] net: dsa: microchip: remove unused dev->dev_ops->phylink_mac_config()

Message ID 20230316161250.3286055-5-vladimir.oltean@nxp.com
State New
Headers
Series KSZ DSA driver: xMII speed adjustment and partial reg_fields conversion |

Commit Message

Vladimir Oltean March 16, 2023, 4:12 p.m. UTC
  The history is that Arun first added a phylink_mac_config()
implementation for lan937x_dev_ops in commit a0cb1aa43825 ("net: dsa:
microchip: lan937x: add phylink_mac_config support"), then in commit
f3d890f5f90e ("net: dsa: microchip: add support for phylink mac
config"), that implementation became common for all switches, but the
dev_ops->phylink_mac_config() function pointer remained there, even
though there is no switch-specific handling anymore.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/dsa/microchip/ksz_common.c | 3 ---
 drivers/net/dsa/microchip/ksz_common.h | 3 ---
 2 files changed, 6 deletions(-)
  

Patch

diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index 9bc26c5da254..421e1212b210 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -2894,9 +2894,6 @@  static void ksz_phylink_mac_config(struct dsa_switch *ds, int port,
 
 	ksz_set_xmii(dev, port, state->interface);
 
-	if (dev->dev_ops->phylink_mac_config)
-		dev->dev_ops->phylink_mac_config(dev, port, mode, state);
-
 	if (dev->dev_ops->setup_rgmii_delay)
 		dev->dev_ops->setup_rgmii_delay(dev, port);
 }
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h
index 760e5f21faa1..618154f3c894 100644
--- a/drivers/net/dsa/microchip/ksz_common.h
+++ b/drivers/net/dsa/microchip/ksz_common.h
@@ -378,9 +378,6 @@  struct ksz_dev_ops {
 	int (*change_mtu)(struct ksz_device *dev, int port, int mtu);
 	void (*freeze_mib)(struct ksz_device *dev, int port, bool freeze);
 	void (*port_init_cnt)(struct ksz_device *dev, int port);
-	void (*phylink_mac_config)(struct ksz_device *dev, int port,
-				   unsigned int mode,
-				   const struct phylink_link_state *state);
 	void (*setup_rgmii_delay)(struct ksz_device *dev, int port);
 	int (*tc_cbs_set_cinc)(struct ksz_device *dev, int port, u32 val);
 	void (*config_cpu_port)(struct dsa_switch *ds);