All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: build warning after merge of the pm tree
@ 2019-10-14 23:08 Stephen Rothwell
  2019-10-14 23:16 ` linux-next: build failure after merge of the pm tree (Was: linux-next: build warning after merge of the pm tree) Stephen Rothwell
  2019-10-15  8:23 ` linux-next: build warning after merge of the pm tree Andy Shevchenko
  0 siblings, 2 replies; 7+ messages in thread
From: Stephen Rothwell @ 2019-10-14 23:08 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Andy Shevchenko, Mika Westerberg

[-- Attachment #1: Type: text/plain, Size: 709 bytes --]

Hi all,

After merging the pm tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

In file included from include/linux/irqchip.h:14,
                 from arch/arm/kernel/irq.c:26:
include/linux/acpi.h:682:31: warning: 'struct acpi_device' declared inside parameter list will not be visible outside of this definition or declaration
  682 | acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2, const char *uid2)
      |                               ^~~~~~~~~~~

and many more.

Introduced by commit

  d1748b57dc88 ("ACPI / utils: Introduce acpi_dev_hid_uid_match() helper")

CONFIG_ACPI is not set for this build.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* linux-next: build failure after merge of the pm tree (Was: linux-next: build warning after merge of the pm tree)
  2019-10-14 23:08 linux-next: build warning after merge of the pm tree Stephen Rothwell
@ 2019-10-14 23:16 ` Stephen Rothwell
  2019-10-15 10:04   ` Rafael J. Wysocki
  2019-10-15  8:23 ` linux-next: build warning after merge of the pm tree Andy Shevchenko
  1 sibling, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2019-10-14 23:16 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Andy Shevchenko, Mika Westerberg

[-- Attachment #1: Type: text/plain, Size: 1436 bytes --]

Hi all,

On Tue, 15 Oct 2019 10:08:55 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the pm tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
> 
> In file included from include/linux/irqchip.h:14,
>                  from arch/arm/kernel/irq.c:26:
> include/linux/acpi.h:682:31: warning: 'struct acpi_device' declared inside parameter list will not be visible outside of this definition or declaration
>   682 | acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2, const char *uid2)
>       |                               ^~~~~~~~~~~
> 
> and many more.
> 
> Introduced by commit
> 
>   d1748b57dc88 ("ACPI / utils: Introduce acpi_dev_hid_uid_match() helper")
> 
> CONFIG_ACPI is not set for this build.

This became a build failure for the powerpc ppc64_allmodconfig build:

In file included from include/linux/i2c.h:13,
                 from arch/powerpc/platforms/pasemi/misc.c:14:
include/linux/acpi.h:682:31: error: 'struct acpi_device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
  682 | acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2, const char *uid2)
      |                               ^~~~~~~~~~~
cc1: all warnings being treated as errors

(and many more)

I have used the pm tree from next-20191014 for today.
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: build warning after merge of the pm tree
  2019-10-14 23:08 linux-next: build warning after merge of the pm tree Stephen Rothwell
  2019-10-14 23:16 ` linux-next: build failure after merge of the pm tree (Was: linux-next: build warning after merge of the pm tree) Stephen Rothwell
@ 2019-10-15  8:23 ` Andy Shevchenko
  2019-10-15  9:41   ` Rafael J. Wysocki
  1 sibling, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2019-10-15  8:23 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Rafael J. Wysocki, Linux Next Mailing List,
	Linux Kernel Mailing List, Mika Westerberg

On Tue, Oct 15, 2019 at 10:08:55AM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the pm tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
> 
> In file included from include/linux/irqchip.h:14,
>                  from arch/arm/kernel/irq.c:26:
> include/linux/acpi.h:682:31: warning: 'struct acpi_device' declared inside parameter list will not be visible outside of this definition or declaration
>   682 | acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2, const char *uid2)
>       |                               ^~~~~~~~~~~
> 
> and many more.
> 
> Introduced by commit
> 
>   d1748b57dc88 ("ACPI / utils: Introduce acpi_dev_hid_uid_match() helper")
> 
> CONFIG_ACPI is not set for this build.

I'm puzzled. Why it builds before?

Another function has struct acpi_device *adev in its prototype and it was
before above mentioned commit.


-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: build warning after merge of the pm tree
  2019-10-15  8:23 ` linux-next: build warning after merge of the pm tree Andy Shevchenko
@ 2019-10-15  9:41   ` Rafael J. Wysocki
  0 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2019-10-15  9:41 UTC (permalink / raw)
  To: Andy Shevchenko, Stephen Rothwell
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Mika Westerberg

On Tuesday, October 15, 2019 10:23:33 AM CEST Andy Shevchenko wrote:
> On Tue, Oct 15, 2019 at 10:08:55AM +1100, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the pm tree, today's linux-next build (arm
> > multi_v7_defconfig) produced this warning:
> > 
> > In file included from include/linux/irqchip.h:14,
> >                  from arch/arm/kernel/irq.c:26:
> > include/linux/acpi.h:682:31: warning: 'struct acpi_device' declared inside parameter list will not be visible outside of this definition or declaration
> >   682 | acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2, const char *uid2)
> >       |                               ^~~~~~~~~~~
> > 
> > and many more.
> > 
> > Introduced by commit
> > 
> >   d1748b57dc88 ("ACPI / utils: Introduce acpi_dev_hid_uid_match() helper")
> > 
> > CONFIG_ACPI is not set for this build.
> 
> I'm puzzled. Why it builds before?
> 
> Another function has struct acpi_device *adev in its prototype and it was
> before above mentioned commit.

Right.

The very next acpi_dev_get_first_match_dev() returns a pointer to
struct acpi_device too and it is not modified by the commit in question.

There may be a bug in there, but commit d1748b57dc88 doesn't look like the
source of it.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: build failure after merge of the pm tree (Was: linux-next: build warning after merge of the pm tree)
  2019-10-14 23:16 ` linux-next: build failure after merge of the pm tree (Was: linux-next: build warning after merge of the pm tree) Stephen Rothwell
@ 2019-10-15 10:04   ` Rafael J. Wysocki
  2019-10-16  9:15     ` Geert Uytterhoeven
  0 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2019-10-15 10:04 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Andy Shevchenko, Mika Westerberg

On Tuesday, October 15, 2019 1:16:50 AM CEST Stephen Rothwell wrote:
> 
> --Sig_/6GS1h5au_w04qPbsgg/ztsa
> Content-Type: text/plain; charset=US-ASCII
> Content-Transfer-Encoding: quoted-printable
> 
> Hi all,
> 
> On Tue, 15 Oct 2019 10:08:55 +1100 Stephen Rothwell <sfr@canb.auug.org.au> =
> wrote:
> >
> > After merging the pm tree, today's linux-next build (arm
> > multi_v7_defconfig) produced this warning:
> >=20
> > In file included from include/linux/irqchip.h:14,
> >                  from arch/arm/kernel/irq.c:26:
> > include/linux/acpi.h:682:31: warning: 'struct acpi_device' declared insid=
> e parameter list will not be visible outside of this definition or declarat=
> ion
> >   682 | acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2=
> , const char *uid2)
> >       |                               ^~~~~~~~~~~
> >=20
> > and many more.
> >=20
> > Introduced by commit
> >=20
> >   d1748b57dc88 ("ACPI / utils: Introduce acpi_dev_hid_uid_match() helper")
> >=20
> > CONFIG_ACPI is not set for this build.
> 
> This became a build failure for the powerpc ppc64_allmodconfig build:
> 
> In file included from include/linux/i2c.h:13,
>                  from arch/powerpc/platforms/pasemi/misc.c:14:
> include/linux/acpi.h:682:31: error: 'struct acpi_device' declared inside pa=
> rameter list will not be visible outside of this definition or declaration =
> [-Werror]
>   682 | acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2, =
> const char *uid2)
>       |                               ^~~~~~~~~~~
> cc1: all warnings being treated as errors
> 
> (and many more)
> 
> I have used the pm tree from next-20191014 for today.

So this looks weird, because there is an acpi_dev_put() stub in
include/linux/acpi.h too in the same #else block and it takes a
(struct acpi_device *) pointer too and it has not been touched by
the commit in question.  So why has it built successfully so far?

Also I wonder why 0-day didn't warn about that commit.

Anyway, I've added an extra declaration of struct acpi_device to the #else
block in question to suppress the warning(s).




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: build failure after merge of the pm tree (Was: linux-next: build warning after merge of the pm tree)
  2019-10-15 10:04   ` Rafael J. Wysocki
@ 2019-10-16  9:15     ` Geert Uytterhoeven
  2019-10-16  9:33       ` Andy Shevchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2019-10-16  9:15 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, Andy Shevchenko, Mika Westerberg

Hi Rafael,

On Tue, Oct 15, 2019 at 1:27 PM Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> On Tuesday, October 15, 2019 1:16:50 AM CEST Stephen Rothwell wrote:
> > On Tue, 15 Oct 2019 10:08:55 +1100 Stephen Rothwell <sfr@canb.auug.org.au> =
> > wrote:
> > >
> > > After merging the pm tree, today's linux-next build (arm
> > > multi_v7_defconfig) produced this warning:
> > >=20
> > > In file included from include/linux/irqchip.h:14,
> > >                  from arch/arm/kernel/irq.c:26:
> > > include/linux/acpi.h:682:31: warning: 'struct acpi_device' declared insid=
> > e parameter list will not be visible outside of this definition or declarat=
> > ion
> > >   682 | acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2=
> > , const char *uid2)
> > >       |                               ^~~~~~~~~~~
> > >=20
> > > and many more.
> > >=20
> > > Introduced by commit
> > >=20
> > >   d1748b57dc88 ("ACPI / utils: Introduce acpi_dev_hid_uid_match() helper")
> > >=20
> > > CONFIG_ACPI is not set for this build.
> >
> > This became a build failure for the powerpc ppc64_allmodconfig build:
> >
> > In file included from include/linux/i2c.h:13,
> >                  from arch/powerpc/platforms/pasemi/misc.c:14:
> > include/linux/acpi.h:682:31: error: 'struct acpi_device' declared inside pa=
> > rameter list will not be visible outside of this definition or declaration =
> > [-Werror]
> >   682 | acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2, =
> > const char *uid2)
> >       |                               ^~~~~~~~~~~
> > cc1: all warnings being treated as errors
> >
> > (and many more)
> >
> > I have used the pm tree from next-20191014 for today.
>
> So this looks weird, because there is an acpi_dev_put() stub in
> include/linux/acpi.h too in the same #else block and it takes a
> (struct acpi_device *) pointer too and it has not been touched by
> the commit in question.  So why has it built successfully so far?

Looks like that never warned because acpi_dev_put() is located after

    static inline struct acpi_device *
    acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv)
    {
            return NULL;
    }

Moving acpi_dev_hid_uid_match() down gets rid of the warning, too.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: build failure after merge of the pm tree (Was: linux-next: build warning after merge of the pm tree)
  2019-10-16  9:15     ` Geert Uytterhoeven
@ 2019-10-16  9:33       ` Andy Shevchenko
  0 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2019-10-16  9:33 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Rafael J. Wysocki, Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, Mika Westerberg

On Wed, Oct 16, 2019 at 11:15:44AM +0200, Geert Uytterhoeven wrote:
> On Tue, Oct 15, 2019 at 1:27 PM Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > On Tuesday, October 15, 2019 1:16:50 AM CEST Stephen Rothwell wrote:
> > > On Tue, 15 Oct 2019 10:08:55 +1100 Stephen Rothwell <sfr@canb.auug.org.au> =
> > > wrote:

> > > This became a build failure for the powerpc ppc64_allmodconfig build:
> > >
> > > In file included from include/linux/i2c.h:13,
> > >                  from arch/powerpc/platforms/pasemi/misc.c:14:
> > > include/linux/acpi.h:682:31: error: 'struct acpi_device' declared inside pa=
> > > rameter list will not be visible outside of this definition or declaration =
> > > [-Werror]
> > >   682 | acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2, =
> > > const char *uid2)
> > >       |                               ^~~~~~~~~~~
> > > cc1: all warnings being treated as errors
> > >
> > > (and many more)
> > >
> > > I have used the pm tree from next-20191014 for today.
> >
> > So this looks weird, because there is an acpi_dev_put() stub in
> > include/linux/acpi.h too in the same #else block and it takes a
> > (struct acpi_device *) pointer too and it has not been touched by
> > the commit in question.  So why has it built successfully so far?
> 
> Looks like that never warned because acpi_dev_put() is located after
> 
>     static inline struct acpi_device *
>     acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv)
>     {
>             return NULL;
>     }
> 
> Moving acpi_dev_hid_uid_match() down gets rid of the warning, too.

Sounds like a compiler bug.

It thinks that struct acpi_device * is defined as function prototype?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-10-16  9:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-14 23:08 linux-next: build warning after merge of the pm tree Stephen Rothwell
2019-10-14 23:16 ` linux-next: build failure after merge of the pm tree (Was: linux-next: build warning after merge of the pm tree) Stephen Rothwell
2019-10-15 10:04   ` Rafael J. Wysocki
2019-10-16  9:15     ` Geert Uytterhoeven
2019-10-16  9:33       ` Andy Shevchenko
2019-10-15  8:23 ` linux-next: build warning after merge of the pm tree Andy Shevchenko
2019-10-15  9:41   ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.