[PATCH net-next v17 03/15] net: phy: Introduce PHY ports representation

Maxime Chevallier maxime.chevallier at bootlin.com
Thu Nov 20 07:18:14 PST 2025



On 20/11/2025 04:54, Jakub Kicinski wrote:
> On Wed, 19 Nov 2025 20:59:04 +0100 Maxime Chevallier wrote:
>> diff --git a/net/ethtool/common.c b/net/ethtool/common.c
>> index 2f4b70f104e8..8216e4ada58e 100644
>> --- a/net/ethtool/common.c
>> +++ b/net/ethtool/common.c
>> @@ -460,6 +460,21 @@ const struct link_mode_info link_mode_params[] = {
>>  static_assert(ARRAY_SIZE(link_mode_params) == __ETHTOOL_LINK_MODE_MASK_NBITS);
>>  EXPORT_SYMBOL_GPL(link_mode_params);
>>  
>> +const char ethtool_link_medium_names[][ETH_GSTRING_LEN] = {
>> +	[ETHTOOL_LINK_MEDIUM_BASET] = "BaseT",
>> +	[ETHTOOL_LINK_MEDIUM_BASEK] = "BaseK",
>> +	[ETHTOOL_LINK_MEDIUM_BASES] = "BaseS",
>> +	[ETHTOOL_LINK_MEDIUM_BASEC] = "BaseC",
>> +	[ETHTOOL_LINK_MEDIUM_BASEL] = "BaseL",
>> +	[ETHTOOL_LINK_MEDIUM_BASED] = "BaseD",
>> +	[ETHTOOL_LINK_MEDIUM_BASEE] = "BaseE",
>> +	[ETHTOOL_LINK_MEDIUM_BASEF] = "BaseF",
>> +	[ETHTOOL_LINK_MEDIUM_BASEV] = "BaseV",
>> +	[ETHTOOL_LINK_MEDIUM_BASEMLD] = "BaseMLD",
>> +	[ETHTOOL_LINK_MEDIUM_NONE] = "None",
>> +};
>> +static_assert(ARRAY_SIZE(ethtool_link_medium_names) == __ETHTOOL_LINK_MEDIUM_LAST);
> 
> Thanks for reshuffling things, this one needs a static tho:
> 
> net/ethtool/common.c:463:12: warning: symbol 'ethtool_link_medium_names' was not declared. Should it be static?

Ok I figured that I didn't have sparse installed locally, so the
local NIPA build "build_allmodconfig_warn" didn't go through.

That's fixed now, hopefully even less bugs next time !

Maxime




More information about the linux-arm-kernel mailing list