Re: [PATCH net-next v3 1/3] ethtool: Implement ethtool_puts()

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

 



On Fri, Oct 27, 2023 at 06:20:08PM -0700, Justin Stitt wrote:
> On Fri, Oct 27, 2023 at 4:43 PM Andrew Lunn <andrew@xxxxxxx> wrote:
> >
> > > +/**
> > > + * ethtool_puts - Write string to ethtool string data
> > > + * @data: Pointer to start of string to update
> >
> > Isn't it actually a pointer to a pointer to the start of string to
> > update?
> 
> I suppose.

Its kind of relevant because you increment by the length, which you
can only do because it is **. I also find it a pretty strange API, so
documenting it correctly is important for me.

> 
> FWIW, I just copy-pasted the sprintf doc and tweaked:
> /**
>  * ethtool_sprintf - Write formatted string to ethtool string data
>  * @data: Pointer to start of string to update

So that need fixing as well. I will cook up a patch for this one.

   Andrew




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux