[PATCH V3 2/3] net: phy: Drop phy_interface_is_sgmii

Nishanth Menon nm at ti.com
Sat Apr 15 00:06:44 CEST 2023


Recent commit 75d28899e3e9 ("net: phy: Synchronize PHY interface modes
with Linux") reordered the enum definitions. This caused the range of
enums that this api was checking to go bad.

There aren't anymore users of phy_interface_is_sgmii, so, just drop
it. Also the protocols are so very different that it makes no sense to
provide a helper wrapper in the hope of reuse for phy drivers.

Reported-by: Tom Rini <trini at konsulko.com>
Suggested-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
Suggested-by: Marek Behún <kabel at kernel.org>
Link: https://lore.kernel.org/all/20230414103852.38705065@dellmb/
Signed-off-by: Nishanth Menon <nm at ti.com>
---
Changes Since v2:
* Redone the patch, but original versions below (did'nt make sense to
  carry reviewed-by)
* Just drop the phy_interface_is_sgmii
V2: https://lore.kernel.org/r/20230414042433.3436425-2-nm@ti.com
V1: https://lore.kernel.org/r/20230413180713.2922524-2-nm@ti.com

 include/phy.h | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/include/phy.h b/include/phy.h
index a837fed72352..cb87d1d4fc95 100644
--- a/include/phy.h
+++ b/include/phy.h
@@ -365,18 +365,6 @@ static inline bool phy_interface_is_rgmii(struct phy_device *phydev)
 		phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID;
 }
 
-/**
- * phy_interface_is_sgmii - Convenience function for testing if a PHY interface
- * is SGMII (all variants)
- * @phydev: the phy_device struct
- * @return: true if MII bus is SGMII or false if it is not
- */
-static inline bool phy_interface_is_sgmii(struct phy_device *phydev)
-{
-	return phydev->interface >= PHY_INTERFACE_MODE_SGMII &&
-		phydev->interface <= PHY_INTERFACE_MODE_QSGMII;
-}
-
 bool phy_interface_is_ncsi(void);
 
 /* PHY UIDs for various PHYs that are referenced in external code */
-- 
2.40.0



More information about the U-Boot mailing list