Re: [PATCH v2 16/25] arch: arm: mach-at91: pm: Move prototypes to mutually included header

From: Lee Jones
Date: Fri Nov 13 2020 - 05:00:47 EST


On Fri, 13 Nov 2020, Alexandre Belloni wrote:

> On 12/11/2020 10:48:10+0000, Lee Jones wrote:
> > On Thu, 12 Nov 2020, Alexandre Belloni wrote:
> >
> > > Hi,
> > >
> > > On 12/11/2020 09:39:18+0000, Lee Jones wrote:
> > > > Both the caller and the supplier's source file should have access to
> > > > the include file containing the prototypes.
> > > >
> > > > Fixes the following W=1 kernel build warning(s):
> > > >
> > > > drivers/pinctrl/pinctrl-at91.c:1637:6: warning: no previous prototype for ‘at91_pinctrl_gpio_suspend’ [-Wmissing-prototypes]
> > > > 1637 | void at91_pinctrl_gpio_suspend(void)
> > > > | ^~~~~~~~~~~~~~~~~~~~~~~~~
> > > > drivers/pinctrl/pinctrl-at91.c:1661:6: warning: no previous prototype for ‘at91_pinctrl_gpio_resume’ [-Wmissing-prototypes]
> > > > 1661 | void at91_pinctrl_gpio_resume(void)
> > > > | ^~~~~~~~~~~~~~~~~~~~~~~~
> > > >
> > > > Cc: Russell King <linux@xxxxxxxxxxxxxxx>
> > > > Cc: Nicolas Ferre <nicolas.ferre@xxxxxxxxxxxxx>
> > > > Cc: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
> > > > Cc: Ludovic Desroches <ludovic.desroches@xxxxxxxxxxxxx>
> > > > Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
> > > > ---
> >
> > [...]
> >
> > > > diff --git a/include/soc/at91/pm.h b/include/soc/at91/pm.h
> > > > new file mode 100644
> > > > index 0000000000000..0fd5093f7f73a
> > > > --- /dev/null
> > > > +++ b/include/soc/at91/pm.h
> > > > @@ -0,0 +1,9 @@
> > > > +/* SPDX-License-Identifier: GPL-2.0-only */
> > > > +/*
> > > > + * atmel platform data
> > > > + */
> > > > +
> > > > +#ifdef CONFIG_PINCTRL_AT91
> > >
> > > Shouldn't that be a header guard instead of depending on PINCTRL_AT91 ?
> >
> > I copied the same semantics from the header it was taken from.
> >
> > Happy to turn it into a proper header file too.
>
> I guess that would be better. How do you expect this patch to be merged?

I'll fix it.

No expectations. Whatever's easiest.

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog