2024-01-15 05:21:52

by Randy Dunlap

[permalink] [raw]
Subject: [PATCH v2] gpio: EN7523: fix kernel-doc warnings

Add "struct" keyword and explain the @dir array differently to
prevent kernel-doc warnings:

gpio-en7523.c:22: warning: cannot understand function prototype: 'struct airoha_gpio_ctrl '
gpio-en7523.c:27: warning: Function parameter or struct member 'dir' not described in 'airoha_gpio_ctrl'
gpio-en7523.c:27: warning: Excess struct member 'dir0' description in 'airoha_gpio_ctrl'
gpio-en7523.c:27: warning: Excess struct member 'dir1' description in 'airoha_gpio_ctrl'

Signed-off-by: Randy Dunlap <[email protected]>
Cc: John Crispin <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Felix Fietkau <[email protected]>
Cc: [email protected]
---
v2: Add commit text.

drivers/gpio/gpio-en7523.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff -- a/drivers/gpio/gpio-en7523.c b/drivers/gpio/gpio-en7523.c
--- a/drivers/gpio/gpio-en7523.c
+++ b/drivers/gpio/gpio-en7523.c
@@ -12,11 +12,11 @@
#define AIROHA_GPIO_MAX 32

/**
- * airoha_gpio_ctrl - Airoha GPIO driver data
+ * struct airoha_gpio_ctrl - Airoha GPIO driver data
* @gc: Associated gpio_chip instance.
* @data: The data register.
- * @dir0: The direction register for the lower 16 pins.
- * @dir1: The direction register for the higher 16 pins.
+ * @dir: [0] The direction register for the lower 16 pins.
+ * [1]: The direction register for the higher 16 pins.
* @output: The output enable register.
*/
struct airoha_gpio_ctrl {


2024-01-15 10:16:04

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [PATCH v2] gpio: EN7523: fix kernel-doc warnings

On Mon, Jan 15, 2024 at 6:21 AM Randy Dunlap <[email protected]> wrote:
>
> Add "struct" keyword and explain the @dir array differently to
> prevent kernel-doc warnings:
>
> gpio-en7523.c:22: warning: cannot understand function prototype: 'struct airoha_gpio_ctrl '
> gpio-en7523.c:27: warning: Function parameter or struct member 'dir' not described in 'airoha_gpio_ctrl'
> gpio-en7523.c:27: warning: Excess struct member 'dir0' description in 'airoha_gpio_ctrl'
> gpio-en7523.c:27: warning: Excess struct member 'dir1' description in 'airoha_gpio_ctrl'
>
> Signed-off-by: Randy Dunlap <[email protected]>
> Cc: John Crispin <[email protected]>
> Cc: Linus Walleij <[email protected]>
> Cc: Bartosz Golaszewski <[email protected]>
> Cc: Felix Fietkau <[email protected]>
> Cc: [email protected]
> ---
> v2: Add commit text.
>
> drivers/gpio/gpio-en7523.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff -- a/drivers/gpio/gpio-en7523.c b/drivers/gpio/gpio-en7523.c
> --- a/drivers/gpio/gpio-en7523.c
> +++ b/drivers/gpio/gpio-en7523.c
> @@ -12,11 +12,11 @@
> #define AIROHA_GPIO_MAX 32
>
> /**
> - * airoha_gpio_ctrl - Airoha GPIO driver data
> + * struct airoha_gpio_ctrl - Airoha GPIO driver data
> * @gc: Associated gpio_chip instance.
> * @data: The data register.
> - * @dir0: The direction register for the lower 16 pins.
> - * @dir1: The direction register for the higher 16 pins.
> + * @dir: [0] The direction register for the lower 16 pins.
> + * [1]: The direction register for the higher 16 pins.
> * @output: The output enable register.
> */
> struct airoha_gpio_ctrl {

Could you add a Fixes: tag too, please?

Bartosz