Re: [PATCH net-next v6 2/7] net: ethtool: plumb PHY stats to PHY drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu,  9 Jan 2025 10:44:52 +0100 Oleksij Rempel wrote:
> +static inline void phy_ethtool_get_phy_stats(struct phy_device *phydev,
> +					struct ethtool_eth_phy_stats *phy_stats,
> +					struct ethtool_phy_stats *phydev_stats)
> +{
> +	ASSERT_RTNL();
> +
> +	if (!phylib_stubs)
> +		return;
> +
> +	phylib_stubs->get_phy_stats(phydev, phy_stats, phydev_stats);
> +}
> +
> +static inline void phy_ethtool_get_link_ext_stats(struct phy_device *phydev,
> +				    struct ethtool_link_ext_stats *link_stats)
> +{
> +	ASSERT_RTNL();
> +
> +	if (!phylib_stubs)
> +		return;
> +
> +	phylib_stubs->get_link_ext_stats(phydev, link_stats);
> +}

So we traded on set of static inlines for another?
What's wrong with adding a C source which is always built in?
Like drivers/net/phy/stubs.c, maybe call it drivers/net/phy/accessors.c
or drivers/net/phy/helpers.c




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux