]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: dsa: mt7530: move p5_intf_modes() function to mt7530.c
authorDaniel Golle <daniel@makrotopia.org>
Mon, 3 Apr 2023 01:18:28 +0000 (02:18 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Apr 2023 09:13:00 +0000 (10:13 +0100)
In preparation of splitting mt7530.c into a driver for MDIO-connected
as well as MDIO-accessed built-in switches on one hand and MMIO-accessed
built-in switches move the p5_inft_modes() function from mt7530.h to
mt7530.c. The function is only needed there and will trigger a compiler
warning about a defined but unused function otherwise when including
mt7530.h in the to-be-introduced bus-specific drivers.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mt7530.c
drivers/net/dsa/mt7530.h

index 9d49cbc8ddcb2f1a5092ee5b0e2f4668ec222c7f..1215d5e4dd38abba42b6f92dee4e30312503ec57 100644 (file)
@@ -943,6 +943,24 @@ mt7530_set_ageing_time(struct dsa_switch *ds, unsigned int msecs)
        return 0;
 }
 
+static const char *p5_intf_modes(unsigned int p5_interface)
+{
+       switch (p5_interface) {
+       case P5_DISABLED:
+               return "DISABLED";
+       case P5_INTF_SEL_PHY_P0:
+               return "PHY P0";
+       case P5_INTF_SEL_PHY_P4:
+               return "PHY P4";
+       case P5_INTF_SEL_GMAC5:
+               return "GMAC5";
+       case P5_INTF_SEL_GMAC5_SGMII:
+               return "GMAC5_SGMII";
+       default:
+               return "unknown";
+       }
+}
+
 static void mt7530_setup_port5(struct dsa_switch *ds, phy_interface_t interface)
 {
        struct mt7530_priv *priv = ds->priv;
index 39aaca50961bd8bebba5576e5974c51118275ea5..2a611173a7d08a50177c11b4d2cc55c9253e7839 100644 (file)
@@ -682,24 +682,6 @@ enum p5_interface_select {
        P5_INTF_SEL_GMAC5_SGMII,
 };
 
-static const char *p5_intf_modes(unsigned int p5_interface)
-{
-       switch (p5_interface) {
-       case P5_DISABLED:
-               return "DISABLED";
-       case P5_INTF_SEL_PHY_P0:
-               return "PHY P0";
-       case P5_INTF_SEL_PHY_P4:
-               return "PHY P4";
-       case P5_INTF_SEL_GMAC5:
-               return "GMAC5";
-       case P5_INTF_SEL_GMAC5_SGMII:
-               return "GMAC5_SGMII";
-       default:
-               return "unknown";
-       }
-}
-
 struct mt7530_priv;
 
 struct mt753x_pcs {