[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4c35670a-e4db-4dd3-bf2c-73eb33ca2c1a@engleder-embedded.com>
Date: Tue, 14 Jan 2025 21:21:18 +0100
From: Gerhard Engleder <gerhard@...leder-embedded.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 5/5] tsnep: Add PHY loopback selftests
On 13.01.25 23:06, Andrew Lunn wrote:
>> +static bool set_speed(struct tsnep_adapter *adapter, int speed)
>> +{
>> + struct ethtool_link_ksettings cmd;
>> + int retval;
>> +
>> + retval = tsnep_ethtool_ops.get_link_ksettings(adapter->netdev, &cmd);
>> + if (retval)
>> + return false;
>
> Why go via tsnep_ethtool_ops. Since this is all internal to the
> driver, you know how this callback is implemented.
Yes, I know how this callback is implemented, but this way I don't
double this knowledge. With this implementation get_link_ksettings()
can be changed locally within tsnep_ethtool.c without potentially
forgetting to sync the selftests.
Gerhard
Powered by blists - more mailing lists