[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 6 Jun 2022 08:50:02 +0100
From: Mauro Carvalho Chehab <mchehab@...nel.org>
To: Akira Yokosawa <akiyks@...il.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
linux-gpio@...r.kernel.org, Joey Gouly <joey.gouly@....com>,
Marc Zyngier <maz@...nel.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Jonathan Corbet <corbet@....net>, linux-kernel@...r.kernel.org,
linux-next@...r.kernel.org
Subject: Re: [PATCH] gpio: Fix kernel-doc comments to nested union
Em Mon, 6 Jun 2022 13:44:24 +0900
Akira Yokosawa <akiyks@...il.com> escreveu:
> Commit 48ec13d36d3f ("gpio: Properly document parent data union")
> is supposed to have fixed a warning from "make htmldocs" regarding
> kernel-doc comments to union members. However, the same warning
> still remains [1].
>
> Fix the issue by following the example found in section "Nested
> structs/unions" of Documentation/doc-guide/kernel-doc.rst.
>
> Signed-off-by: Akira Yokosawa <akiyks@...il.com>
> Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
> Fixes: 48ec13d36d3f ("gpio: Properly document parent data union")
> Link: https://lore.kernel.org/r/20220606093302.21febee3@canb.auug.org.au/ [1]
> Cc: Linus Walleij <linus.walleij@...aro.org>
> Cc: Bartosz Golaszewski <brgl@...ev.pl>
> Cc: Joey Gouly <joey.gouly@....com>
> Cc: Marc Zyngier <maz@...nel.org>
> ---
> include/linux/gpio/driver.h | 29 ++++++++++++++++-------------
> 1 file changed, 16 insertions(+), 13 deletions(-)
>
> diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
> index b1e0f1f8ee2e..54c3c6506503 100644
> --- a/include/linux/gpio/driver.h
> +++ b/include/linux/gpio/driver.h
> @@ -167,21 +167,24 @@ struct gpio_irq_chip {
> */
> irq_flow_handler_t parent_handler;
>
> - /**
> - * @parent_handler_data:
> - *
> - * If @per_parent_data is false, @parent_handler_data is a single
> - * pointer used as the data associated with every parent interrupt.
> - *
> - * @parent_handler_data_array:
> - *
> - * If @per_parent_data is true, @parent_handler_data_array is
> - * an array of @num_parents pointers, and is used to associate
> - * different data for each parent. This cannot be NULL if
> - * @per_parent_data is true.
> - */
> union {
> + /**
> + * @parent_handler_data:
> + *
> + * If @per_parent_data is false, @parent_handler_data is a
> + * single pointer used as the data associated with every
> + * parent interrupt.
> + */
> void *parent_handler_data;
> +
> + /**
> + * @parent_handler_data_array:
> + *
> + * If @per_parent_data is true, @parent_handler_data_array is
> + * an array of @num_parents pointers, and is used to associate
> + * different data for each parent. This cannot be NULL if
> + * @per_parent_data is true.
> + */
> void **parent_handler_data_array;
> };
Yeah, kernel-doc expects inlined comments to be just before each
declaration like the above.
Reviewed-by: Mauro Carvalho Chehab <mchehab@...nel.org>
Regards,
Mauro
Powered by blists - more mailing lists