Message ID | 20200626130525.389469-7-lee.jones@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix a bunch of W=1 warnings in Misc | expand |
On Fri, Jun 26, 2020 at 3:05 PM Lee Jones <lee.jones@linaro.org> wrote: > > Copy-paste issue. Looks like the kerneldoc style descriptions for > these functions were taken from existing functions with slightly > different argument names. > > Fixes the following W=1 warnings: > > drivers/misc/eeprom/eeprom_93cx6.c:239: warning: Function parameter or member 'byte' not described in 'eeprom_93cx6_readb' > drivers/misc/eeprom/eeprom_93cx6.c:239: warning: Excess function parameter 'word' description in 'eeprom_93cx6_readb' > drivers/misc/eeprom/eeprom_93cx6.c:280: warning: Function parameter or member 'bytes' not described in 'eeprom_93cx6_multireadb' > drivers/misc/eeprom/eeprom_93cx6.c:280: warning: Excess function parameter 'words' description in 'eeprom_93cx6_multireadb' > > Cc: Wolfram Sang <wsa@kernel.org> > Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de>
> @@ -270,7 +270,7 @@ EXPORT_SYMBOL_GPL(eeprom_93cx6_readb); > * @eeprom: Pointer to eeprom structure > * @byte: Index from where we should start reading > * @data: target pointer where the information will have to be stored > - * @words: Number of bytes that should be read. > + * @bytes: Number of bytes that should be read. Now we have 'byte' and 'bytes' here as arguments which is confusing. I think renaming 'words' into 'num_bytes' would be even better.
On Sat, 27 Jun 2020, Wolfram Sang wrote: > > @@ -270,7 +270,7 @@ EXPORT_SYMBOL_GPL(eeprom_93cx6_readb); > > * @eeprom: Pointer to eeprom structure > > * @byte: Index from where we should start reading > > * @data: target pointer where the information will have to be stored > > - * @words: Number of bytes that should be read. > > + * @bytes: Number of bytes that should be read. > > Now we have 'byte' and 'bytes' here as arguments which is confusing. I > think renaming 'words' into 'num_bytes' would be even better. I await your patch with bated breath. :)
> > > @@ -270,7 +270,7 @@ EXPORT_SYMBOL_GPL(eeprom_93cx6_readb); > > > * @eeprom: Pointer to eeprom structure > > > * @byte: Index from where we should start reading > > > * @data: target pointer where the information will have to be stored > > > - * @words: Number of bytes that should be read. > > > + * @bytes: Number of bytes that should be read. > > > > Now we have 'byte' and 'bytes' here as arguments which is confusing. I > > think renaming 'words' into 'num_bytes' would be even better. > > I await your patch with bated breath. :) ? You are touching it already, why a second patch?
On Mon, 29 Jun 2020, Wolfram Sang wrote: > > > > > @@ -270,7 +270,7 @@ EXPORT_SYMBOL_GPL(eeprom_93cx6_readb); > > > > * @eeprom: Pointer to eeprom structure > > > > * @byte: Index from where we should start reading > > > > * @data: target pointer where the information will have to be stored > > > > - * @words: Number of bytes that should be read. > > > > + * @bytes: Number of bytes that should be read. > > > > > > Now we have 'byte' and 'bytes' here as arguments which is confusing. I > > > think renaming 'words' into 'num_bytes' would be even better. > > > > I await your patch with bated breath. :) > > ? You are touching it already, why a second patch? Because it's a different change. One that's orthogonal to this set, which is designed simply to ensure the documentation matches reality. The author decided on this (less than ideal [in our humble opinion]) nomenclature from the function's inception back in 2013. Maybe there are good reasons for it to be this way. Either way, it might require a dialogue. For this set I'd rather stick to the script. That said, I genuinely don't mind drafting a patch to fix this. If I am to do so, it would also be as part as a subsequent effort. You or me - your call. Happy either way.
diff --git a/drivers/misc/eeprom/eeprom_93cx6.c b/drivers/misc/eeprom/eeprom_93cx6.c index 36a2eb837371b..9627294fe3e95 100644 --- a/drivers/misc/eeprom/eeprom_93cx6.c +++ b/drivers/misc/eeprom/eeprom_93cx6.c @@ -228,7 +228,7 @@ EXPORT_SYMBOL_GPL(eeprom_93cx6_multiread); /** * eeprom_93cx6_readb - Read a byte from eeprom * @eeprom: Pointer to eeprom structure - * @word: Byte index from where we should start reading + * @byte: Byte index from where we should start reading * @data: target pointer where the information will have to be stored * * This function will read a byte of the eeprom data @@ -270,7 +270,7 @@ EXPORT_SYMBOL_GPL(eeprom_93cx6_readb); * @eeprom: Pointer to eeprom structure * @byte: Index from where we should start reading * @data: target pointer where the information will have to be stored - * @words: Number of bytes that should be read. + * @bytes: Number of bytes that should be read. * * This function will read all requested bytes from the eeprom, * this is done by calling eeprom_93cx6_readb() multiple times.
Copy-paste issue. Looks like the kerneldoc style descriptions for these functions were taken from existing functions with slightly different argument names. Fixes the following W=1 warnings: drivers/misc/eeprom/eeprom_93cx6.c:239: warning: Function parameter or member 'byte' not described in 'eeprom_93cx6_readb' drivers/misc/eeprom/eeprom_93cx6.c:239: warning: Excess function parameter 'word' description in 'eeprom_93cx6_readb' drivers/misc/eeprom/eeprom_93cx6.c:280: warning: Function parameter or member 'bytes' not described in 'eeprom_93cx6_multireadb' drivers/misc/eeprom/eeprom_93cx6.c:280: warning: Excess function parameter 'words' description in 'eeprom_93cx6_multireadb' Cc: Wolfram Sang <wsa@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/misc/eeprom/eeprom_93cx6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)