net: phy: remove helper phy_is_internal
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 13 Feb 2025 21:51:53 +0000 (22:51 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 15 Feb 2025 01:07:46 +0000 (17:07 -0800)
Helper phy_is_internal() is just used in two places phylib-internally.
So let's remove it from the API.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/f3f35265-80a9-4ed7-ad78-ae22c21e288b@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phy.c
drivers/net/phy/phy_device.c
include/linux/phy.h

index 29fb19bb712b0b88c902cb304279e12efbce3b12..f2086b0b7b76ea6a32e8cb6b3616a4653fec0c90 100644 (file)
@@ -302,7 +302,7 @@ void phy_ethtool_ksettings_get(struct phy_device *phydev,
                cmd->base.port = PORT_BNC;
        else
                cmd->base.port = phydev->port;
-       cmd->base.transceiver = phy_is_internal(phydev) ?
+       cmd->base.transceiver = phydev->is_internal ?
                                XCVR_INTERNAL : XCVR_EXTERNAL;
        cmd->base.phy_address = phydev->mdio.addr;
        cmd->base.autoneg = phydev->autoneg;
index 1c10c774b908589a9b5c7a2846fce2f898f8db78..35ec99b4dc5102b96106c06268dc83f6ea998e47 100644 (file)
@@ -544,7 +544,7 @@ phy_interface_show(struct device *dev, struct device_attribute *attr, char *buf)
        struct phy_device *phydev = to_phy_device(dev);
        const char *mode = NULL;
 
-       if (phy_is_internal(phydev))
+       if (phydev->is_internal)
                mode = "internal";
        else
                mode = phy_modes(phydev->interface);
index 2ab83d24a57334d721a24e4a02b869418ca5e38c..3665cdd610a3dc0b979b4f53f8edbb8d224e2797 100644 (file)
@@ -1739,15 +1739,6 @@ static inline bool phy_is_default_hwtstamp(struct phy_device *phydev)
        return phy_has_hwtstamp(phydev) && phydev->default_timestamp;
 }
 
-/**
- * phy_is_internal - Convenience function for testing if a PHY is internal
- * @phydev: the phy_device struct
- */
-static inline bool phy_is_internal(struct phy_device *phydev)
-{
-       return phydev->is_internal;
-}
-
 /**
  * phy_on_sfp - Convenience function for testing if a PHY is on an SFP module
  * @phydev: the phy_device struct