2021-10-27 21:24:02

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the pinctrl tree

Hi all,

After merging the pinctrl tree, today's linux-next build (htmldocs)
produced this warning:

include/linux/gpio/driver.h:284: warning: Function parameter or member 'parent_handler_data_array' not described in 'gpio_irq_chip'

Introduced by commit

cfe6807d82e9 ("gpio: Allow per-parent interrupt data")

But may actually be a problem with the tool :-(

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-10-27 21:24:16

by Marc Zyngier

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the pinctrl tree

On Wed, 27 Oct 2021 12:01:18 +0100,
Stephen Rothwell <[email protected]> wrote:
>
> Hi all,
>
> After merging the pinctrl tree, today's linux-next build (htmldocs)
> produced this warning:
>
> include/linux/gpio/driver.h:284: warning: Function parameter or member 'parent_handler_data_array' not described in 'gpio_irq_chip'
>
> Introduced by commit
>
> cfe6807d82e9 ("gpio: Allow per-parent interrupt data")
>
> But may actually be a problem with the tool :-(

I guess the tool doesn't like having two fields that are part of a
union documented together... Happy to tweak it if someone tells me how
this should be written.

M.

--
Without deviation from the norm, progress is not possible.

2021-10-28 07:04:46

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the pinctrl tree

Em Wed, 27 Oct 2021 12:10:45 +0100
Marc Zyngier <[email protected]> escreveu:

> On Wed, 27 Oct 2021 12:01:18 +0100,
> Stephen Rothwell <[email protected]> wrote:
> >
> > Hi all,
> >
> > After merging the pinctrl tree, today's linux-next build (htmldocs)
> > produced this warning:
> >
> > include/linux/gpio/driver.h:284: warning: Function parameter or member 'parent_handler_data_array' not described in 'gpio_irq_chip'
> >
> > Introduced by commit
> >
> > cfe6807d82e9 ("gpio: Allow per-parent interrupt data")
> >
> > But may actually be a problem with the tool :-(
>
> I guess the tool doesn't like having two fields that are part of a
> union documented together... Happy to tweak it if someone tells me how
> this should be written.

Yes, that's the case. See, when you do:

/**
* @parent_handler_data:
* @parent_handler_data_array:
*
* Data associated, and passed to, the handler for the parent
* interrupt. Can either be a single pointer if @per_parent_data
* is false, or an array of @num_parents pointers otherwise. If
* @per_parent_data is true, @parent_handler_data_array cannot be
* NULL.
*/
union {
void *parent_handler_data;
void **parent_handler_data_array;
};

The tool will understand it as an undocumented "parent_handler_data" and
a documented "parent_handler_data_array".

It has to do that, as otherwise it won't get cases where people just adds a
@foo: as a template but actually forgets to fill it.

The solution would be to add a description for both, e. g. something
similar to:

/**
* @parent_handler_data:
*
* If @per_parent_data is false, contains a single pointer
* with the data associated, and passed to, the handler for the
* parent interrupt.
*
* @parent_handler_data_array:
*
* If @per_parent_data is true, it should contain an array of
* @num_parents pointers with the data associated, and passed to,
* the handler for the parent interrupt. Cannot be NULL.
*/

Regards,
Mauro

2022-01-21 21:05:43

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the pinctrl tree

Hi all,

On Thu, 28 Oct 2021 08:03:31 +0100 Mauro Carvalho Chehab <[email protected]> wrote:
>
> Em Wed, 27 Oct 2021 12:10:45 +0100
> Marc Zyngier <[email protected]> escreveu:
>
> > On Wed, 27 Oct 2021 12:01:18 +0100, Stephen Rothwell <[email protected]> wrote:
> > >
> > > After merging the pinctrl tree, today's linux-next build (htmldocs)
> > > produced this warning:
> > >
> > > include/linux/gpio/driver.h:284: warning: Function parameter or member 'parent_handler_data_array' not described in 'gpio_irq_chip'
> > >
> > > Introduced by commit
> > >
> > > cfe6807d82e9 ("gpio: Allow per-parent interrupt data")
> > >
> > > But may actually be a problem with the tool :-(
> >
> > I guess the tool doesn't like having two fields that are part of a
> > union documented together... Happy to tweak it if someone tells me how
> > this should be written.
>
> Yes, that's the case. See, when you do:
>
> /**
> * @parent_handler_data:
> * @parent_handler_data_array:
> *
> * Data associated, and passed to, the handler for the parent
> * interrupt. Can either be a single pointer if @per_parent_data
> * is false, or an array of @num_parents pointers otherwise. If
> * @per_parent_data is true, @parent_handler_data_array cannot be
> * NULL.
> */
> union {
> void *parent_handler_data;
> void **parent_handler_data_array;
> };
>
> The tool will understand it as an undocumented "parent_handler_data" and
> a documented "parent_handler_data_array".
>
> It has to do that, as otherwise it won't get cases where people just adds a
> @foo: as a template but actually forgets to fill it.
>
> The solution would be to add a description for both, e. g. something
> similar to:
>
> /**
> * @parent_handler_data:
> *
> * If @per_parent_data is false, contains a single pointer
> * with the data associated, and passed to, the handler for the
> * parent interrupt.
> *
> * @parent_handler_data_array:
> *
> * If @per_parent_data is true, it should contain an array of
> * @num_parents pointers with the data associated, and passed to,
> * the handler for the parent interrupt. Cannot be NULL.
> */

I am still getting this warning.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2022-03-18 10:10:24

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the pinctrl tree

Hi all,

On Thu, 20 Jan 2022 14:25:39 +1100 Stephen Rothwell <[email protected]> wrote:
>
> On Thu, 28 Oct 2021 08:03:31 +0100 Mauro Carvalho Chehab <[email protected]> wrote:
> >
> > Em Wed, 27 Oct 2021 12:10:45 +0100
> > Marc Zyngier <[email protected]> escreveu:
> >
> > > On Wed, 27 Oct 2021 12:01:18 +0100, Stephen Rothwell <[email protected]> wrote:
> > > >
> > > > After merging the pinctrl tree, today's linux-next build (htmldocs)
> > > > produced this warning:
> > > >
> > > > include/linux/gpio/driver.h:284: warning: Function parameter or member 'parent_handler_data_array' not described in 'gpio_irq_chip'
> > > >
> > > > Introduced by commit
> > > >
> > > > cfe6807d82e9 ("gpio: Allow per-parent interrupt data")
> > > >
> > > > But may actually be a problem with the tool :-(
> > >
> > > I guess the tool doesn't like having two fields that are part of a
> > > union documented together... Happy to tweak it if someone tells me how
> > > this should be written.
> >
> > Yes, that's the case. See, when you do:
> >
> > /**
> > * @parent_handler_data:
> > * @parent_handler_data_array:
> > *
> > * Data associated, and passed to, the handler for the parent
> > * interrupt. Can either be a single pointer if @per_parent_data
> > * is false, or an array of @num_parents pointers otherwise. If
> > * @per_parent_data is true, @parent_handler_data_array cannot be
> > * NULL.
> > */
> > union {
> > void *parent_handler_data;
> > void **parent_handler_data_array;
> > };
> >
> > The tool will understand it as an undocumented "parent_handler_data" and
> > a documented "parent_handler_data_array".
> >
> > It has to do that, as otherwise it won't get cases where people just adds a
> > @foo: as a template but actually forgets to fill it.
> >
> > The solution would be to add a description for both, e. g. something
> > similar to:
> >
> > /**
> > * @parent_handler_data:
> > *
> > * If @per_parent_data is false, contains a single pointer
> > * with the data associated, and passed to, the handler for the
> > * parent interrupt.
> > *
> > * @parent_handler_data_array:
> > *
> > * If @per_parent_data is true, it should contain an array of
> > * @num_parents pointers with the data associated, and passed to,
> > * the handler for the parent interrupt. Cannot be NULL.
> > */
>
> I am still getting this warning.

I am still getting this warning.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2022-06-06 06:06:31

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the pinctrl tree

Hi all,

On Fri, 18 Mar 2022 18:31:01 +1100 Stephen Rothwell <[email protected]> wrote:
>
> On Thu, 20 Jan 2022 14:25:39 +1100 Stephen Rothwell <[email protected]> wrote:
> >
> > On Thu, 28 Oct 2021 08:03:31 +0100 Mauro Carvalho Chehab <[email protected]> wrote:
> > >
> > > Em Wed, 27 Oct 2021 12:10:45 +0100
> > > Marc Zyngier <[email protected]> escreveu:
> > >
> > > > On Wed, 27 Oct 2021 12:01:18 +0100, Stephen Rothwell <[email protected]> wrote:
> > > > >
> > > > > After merging the pinctrl tree, today's linux-next build (htmldocs)
> > > > > produced this warning:
> > > > >
> > > > > include/linux/gpio/driver.h:284: warning: Function parameter or member 'parent_handler_data_array' not described in 'gpio_irq_chip'
> > > > >
> > > > > Introduced by commit
> > > > >
> > > > > cfe6807d82e9 ("gpio: Allow per-parent interrupt data")
> > > > >
> > > > > But may actually be a problem with the tool :-(
> > > >
> > > > I guess the tool doesn't like having two fields that are part of a
> > > > union documented together... Happy to tweak it if someone tells me how
> > > > this should be written.
> > >
> > > Yes, that's the case. See, when you do:
> > >
> > > /**
> > > * @parent_handler_data:
> > > * @parent_handler_data_array:
> > > *
> > > * Data associated, and passed to, the handler for the parent
> > > * interrupt. Can either be a single pointer if @per_parent_data
> > > * is false, or an array of @num_parents pointers otherwise. If
> > > * @per_parent_data is true, @parent_handler_data_array cannot be
> > > * NULL.
> > > */
> > > union {
> > > void *parent_handler_data;
> > > void **parent_handler_data_array;
> > > };
> > >
> > > The tool will understand it as an undocumented "parent_handler_data" and
> > > a documented "parent_handler_data_array".
> > >
> > > It has to do that, as otherwise it won't get cases where people just adds a
> > > @foo: as a template but actually forgets to fill it.
> > >
> > > The solution would be to add a description for both, e. g. something
> > > similar to:
> > >
> > > /**
> > > * @parent_handler_data:
> > > *
> > > * If @per_parent_data is false, contains a single pointer
> > > * with the data associated, and passed to, the handler for the
> > > * parent interrupt.
> > > *
> > > * @parent_handler_data_array:
> > > *
> > > * If @per_parent_data is true, it should contain an array of
> > > * @num_parents pointers with the data associated, and passed to,
> > > * the handler for the parent interrupt. Cannot be NULL.
> > > */
> >
> > I am still getting this warning.
>
> I am still getting this warning.

I am still getting this warning.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature