lkml.org 
[lkml]   [2022]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH net-next v3] ethtool: doc: clarify what drivers can implement in their get_drvinfo()
On Tue. 16 Nov. 2022 at 01:28, Jakub Kicinski <kuba@kernel.org> wrote:
> On Tue, 15 Nov 2022 16:52:39 +0900 Vincent MAILHOL wrote:
> > - * @fw_version: Firmware version string; may be an empty string
> > - * @erom_version: Expansion ROM version string; may be an empty string
> > + * @fw_version: Firmware version string; drivers can set it; may be an
> > + * empty string
> > + * @erom_version: Expansion ROM version string; drivers can set it;
> > + * may be an empty string
>
> "drivers can set it" rings a little odd to my non-native-English-
> -speaker's ear. Perhaps "driver-defined;" ? Either way is fine, tho.

I am not a native speaker either so I won't argue here. Changed to
"driver defined" in v4.

> > * @bus_info: Device bus address. This should match the dev_name()
> > * string for the underlying bus device, if there is one. May be
> > * an empty string.
> > @@ -180,9 +182,10 @@ static inline __u32 ethtool_cmd_speed(const
> > struct ethtool_cmd *ep)
> > * Users can use the %ETHTOOL_GSSET_INFO command to get the number of
> > * strings in any string set (from Linux 2.6.34).
> > *
> > - * Drivers should set at most @driver, @version, @fw_version and
> > - * @bus_info in their get_drvinfo() implementation. The ethtool
> > - * core fills in the other fields using other driver operations.
> > + * Majority of the drivers should no longer implement the
> > + * get_drvinfo() callback. Most fields are correctly filled in by the
> > + * core using system information, or populated using other driver
> > + * operations.
>
> SG! Good point on the doc being for the struct. We can make the notice
> even stronger if you want by saying s/Majority of the/Modern/

"Modern drivers should no longer..." sounds like an unconditional
interdiction. I changed it to "Modern drivers no longer have to..." to
nuance the terms and suggest that they remain some edge cases.

I sent the v4 but messed up the In-Reply-To tag so it became a new thread:
https://lore.kernel.org/netdev/20221115233524.805956-1-mailhol.vincent@wanadoo.fr/T/#u


Yours sincerely,
Vincent Mailhol

\
 
 \ /
  Last update: 2022-11-16 01:31    [W:0.085 / U:1.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site