Re: [PATCH 07/25] Documentation: gpio/driver.h: fix sphinx warnings

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

 



On 7/17/20 12:48 PM, Joe Perches wrote:
> On Fri, 2020-07-17 at 12:37 -0700, Randy Dunlap wrote:
>> On 7/17/20 11:56 AM, Daniel W. S. Almeida wrote:
>>> From: "Daniel W. S. Almeida" <dwlsalmeida@xxxxxxxxx>
>>>
>>> Fix the following warnings:
>>>
>>> warning: Function parameter or member 'gc' not described in
>>> 'gpiochip_add_data'
>>>
>>> warning: Excess function parameter 'chip' description in
>>> 'gpiochip_add_data'
>>>
>>> Signed-off-by: Daniel W. S. Almeida <dwlsalmeida@xxxxxxxxx>
>>
>> Mauro has already fixed this one.
> 
> Not quite fixed though.
> 
> Both patches did not update the text for chip->base where
> it should have been changed to gc->base
> 
> ---
>  include/linux/gpio/driver.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
> index db82451776fc..91ae7ad8730d 100644
> --- a/include/linux/gpio/driver.h
> +++ b/include/linux/gpio/driver.h
> @@ -497,7 +497,7 @@ extern int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
>  
>  /**
>   * gpiochip_add_data() - register a gpio_chip
> - * @gc: the chip to register, with chip->base initialized
> + * @gc: the chip to register, with gc->base initialized
>   * @data: driver-private data associated with this chip
>   *
>   * Context: potentially before irqs will work

I had a patch for this but apparently I didn't send it since
Mauro's patch had been merged. My patch is dated June 15-2020:


From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

Fix kernel-doc warnings in <linux/gpio/driver.h>:

../include/linux/gpio/driver.h:512: warning: Function parameter or member 'gc' not described in 'gpiochip_add_data'
../include/linux/gpio/driver.h:512: warning: Excess function parameter 'chip' description in 'gpiochip_add_data'

Fixes: 959bc7b22bd2 ("gpio: Automatically add lockdep keys")
Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Thierry Reding <treding@xxxxxxxxxx>
Cc: Linus Walleij <linus.walleij@xxxxxxxxxx>
---
MAURO!
 include/linux/gpio/driver.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- linux-next-20200615.orig/include/linux/gpio/driver.h
+++ linux-next-20200615/include/linux/gpio/driver.h
@@ -481,25 +481,25 @@ extern int gpiochip_add_data_with_key(st
 
 /**
  * gpiochip_add_data() - register a gpio_chip
- * @chip: the chip to register, with chip->base initialized
+ * @gc: the gpio chip to register, with gc->base initialized
  * @data: driver-private data associated with this chip
  *
  * Context: potentially before irqs will work
  *
  * When gpiochip_add_data() is called very early during boot, so that GPIOs
- * can be freely used, the chip->parent device must be registered before
+ * can be freely used, the gc->parent device must be registered before
  * the gpio framework's arch_initcall().  Otherwise sysfs initialization
  * for GPIOs will fail rudely.
  *
  * gpiochip_add_data() must only be called after gpiolib initialization,
  * ie after core_initcall().
  *
- * If chip->base is negative, this requests dynamic assignment of
+ * If gc->base is negative, this requests dynamic assignment of
  * a range of valid GPIOs.
  *
  * Returns:
  * A negative errno if the chip can't be registered, such as because the
- * chip->base is invalid or already associated with a different chip.
+ * gc->base is invalid or already associated with a different chip.
  * Otherwise it returns zero as a success code.
  */
 #ifdef CONFIG_LOCKDEP







[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux