[PATCH net-next v15 04/14] net: sfp: Add helper to return the SFP bus name

Maxime Chevallier maxime.chevallier at bootlin.com
Thu Jul 4 01:04:50 PDT 2024


Hello Russell,

On Wed, 3 Jul 2024 16:36:20 +0100
"Russell King (Oracle)" <linux at armlinux.org.uk> wrote:

> On Wed, Jul 03, 2024 at 04:07:54PM +0200, Maxime Chevallier wrote:
> > Knowing the bus name is helpful when we want to expose the link topology
> > to userspace, add a helper to return the SFP bus name.  
> 
> I think it's worth mentioning about the use case in this patch as well,
> something like:
> 
> "This call will always be made while holding the RTNL which ensures
> that the SFP driver won't unbind from the device. The returned pointer
> to the bus name will only be used while RTNL is held."

I'll add that in both the commit log and the documentation for the
function.

[...]

> > +EXPORT_SYMBOL_GPL(sfp_get_name);  
> 
> Please move this to just below sfp_bus_del_upstream() since the
> functions in this file are organised as:
> 
> - internal functions
> - upstream callable functions
> - downstream (sfp driver) callable functions.
> 
> Note also that the upstream callable functions are all documented with
> kerneldoc, and sfp_get_name() is clearly a function called from the
> upstream side.

No problem, I'll move it and a some proper documentation. Thanks for
the review,

Maxime




More information about the linux-arm-kernel mailing list