diff mbox

linux-next build error (at91) - use of bool in mach/arch.h

Message ID 517F8FF4.3050901@atmel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nicolas Ferre April 30, 2013, 9:33 a.m. UTC
Hi,

Today I discovered an issue while building linux-next for at91:

  CC      arch/arm/mach-at91/at91sam9260_devices.o
In file included from /home/nferre/dev/lnx_buid_test/arch/arm/mach-at91/at91sam9260_devices.c:12:0:
/home/nferre/dev/lnx_buid_test/arch/arm/include/asm/mach/arch.h:46:2: error: expected specifier-qualifier-list before ‘bool’

It also applies to all non-DT at91 platforms (~ 6 machines).

It seems to be caused by inclusion of commmit
4dbfa9a25367cfa91aec0e56d75a6905d3242cd3 (ARM: Enable selection of 
SMP operations at boot time) and its use of the "bool" type.

In fact, we include asm/mach/arch.h file in our at91xxx_devices.c files and
we include it as the first include directive.

So, I am wondering if the best correction is to add the types.h header file
in the asm/mach/arch.h file, like this:


or if a better option would be to re-arrange the include directives in
various at91xxx_devices.c files?

Thanks, bye,

Comments

Geert Uytterhoeven April 30, 2013, 9:39 a.m. UTC | #1
On Tue, Apr 30, 2013 at 11:33 AM, Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
> So, I am wondering if the best correction is to add the types.h header file
> in the asm/mach/arch.h file, like this:
>
> --- a/arch/arm/include/asm/mach/arch.h
> +++ b/arch/arm/include/asm/mach/arch.h
> @@ -8,6 +8,8 @@
>   * published by the Free Software Foundation.
>   */
>
> +#include <linux/types.h>
> +
>  #ifndef __ASSEMBLY__
>
>  struct tag;
>
> or if a better option would be to re-arrange the include directives in
> various at91xxx_devices.c files?

Include files should be self-contained, so asm/mach/arch.h is the right place.

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
Stefano Stabellini April 30, 2013, 11:58 a.m. UTC | #2
On Tue, 30 Apr 2013, Geert Uytterhoeven wrote:
> On Tue, Apr 30, 2013 at 11:33 AM, Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
> > So, I am wondering if the best correction is to add the types.h header file
> > in the asm/mach/arch.h file, like this:
> >
> > --- a/arch/arm/include/asm/mach/arch.h
> > +++ b/arch/arm/include/asm/mach/arch.h
> > @@ -8,6 +8,8 @@
> >   * published by the Free Software Foundation.
> >   */
> >
> > +#include <linux/types.h>
> > +
> >  #ifndef __ASSEMBLY__
> >
> >  struct tag;
> >
> > or if a better option would be to re-arrange the include directives in
> > various at91xxx_devices.c files?
> 
> Include files should be self-contained, so asm/mach/arch.h is the right place.

Nicolas,
are you happy to come up with a proper patch to fix the issue?
Nicolas Ferre April 30, 2013, 12:40 p.m. UTC | #3
On 04/30/2013 01:58 PM, Stefano Stabellini :
> On Tue, 30 Apr 2013, Geert Uytterhoeven wrote:
>> On Tue, Apr 30, 2013 at 11:33 AM, Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
>>> So, I am wondering if the best correction is to add the types.h header file
>>> in the asm/mach/arch.h file, like this:
>>>
>>> --- a/arch/arm/include/asm/mach/arch.h
>>> +++ b/arch/arm/include/asm/mach/arch.h
>>> @@ -8,6 +8,8 @@
>>>   * published by the Free Software Foundation.
>>>   */
>>>
>>> +#include <linux/types.h>
>>> +
>>>  #ifndef __ASSEMBLY__
>>>
>>>  struct tag;
>>>
>>> or if a better option would be to re-arrange the include directives in
>>> various at91xxx_devices.c files?
>>
>> Include files should be self-contained, so asm/mach/arch.h is the right place.
> 
> Nicolas,
> are you happy to come up with a proper patch to fix the issue?

Yep, sent now.

Bye,
Nicolas Pitre April 30, 2013, 3:15 p.m. UTC | #4
On Tue, 30 Apr 2013, Stefano Stabellini wrote:

> On Tue, 30 Apr 2013, Geert Uytterhoeven wrote:
> > On Tue, Apr 30, 2013 at 11:33 AM, Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
> > > So, I am wondering if the best correction is to add the types.h header file
> > > in the asm/mach/arch.h file, like this:
> > >
> > > --- a/arch/arm/include/asm/mach/arch.h
> > > +++ b/arch/arm/include/asm/mach/arch.h
> > > @@ -8,6 +8,8 @@
> > >   * published by the Free Software Foundation.
> > >   */
> > >
> > > +#include <linux/types.h>
> > > +
> > >  #ifndef __ASSEMBLY__
> > >
> > >  struct tag;
> > >
> > > or if a better option would be to re-arrange the include directives in
> > > various at91xxx_devices.c files?
> > 
> > Include files should be self-contained, so asm/mach/arch.h is the right place.
> 
> Nicolas,
> are you happy to come up with a proper patch to fix the issue?

I'd prefer if you just folded the above include into the original patch, 
unless this has been pulled already.


Nicolas
Stefano Stabellini April 30, 2013, 3:59 p.m. UTC | #5
On Tue, 30 Apr 2013, Nicolas Pitre wrote:
> On Tue, 30 Apr 2013, Stefano Stabellini wrote:
> 
> > On Tue, 30 Apr 2013, Geert Uytterhoeven wrote:
> > > On Tue, Apr 30, 2013 at 11:33 AM, Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
> > > > So, I am wondering if the best correction is to add the types.h header file
> > > > in the asm/mach/arch.h file, like this:
> > > >
> > > > --- a/arch/arm/include/asm/mach/arch.h
> > > > +++ b/arch/arm/include/asm/mach/arch.h
> > > > @@ -8,6 +8,8 @@
> > > >   * published by the Free Software Foundation.
> > > >   */
> > > >
> > > > +#include <linux/types.h>
> > > > +
> > > >  #ifndef __ASSEMBLY__
> > > >
> > > >  struct tag;
> > > >
> > > > or if a better option would be to re-arrange the include directives in
> > > > various at91xxx_devices.c files?
> > > 
> > > Include files should be self-contained, so asm/mach/arch.h is the right place.
> > 
> > Nicolas,
> > are you happy to come up with a proper patch to fix the issue?
> 
> I'd prefer if you just folded the above include into the original patch, 
> unless this has been pulled already.

No, I'll exploit the opportunity to resend the patch series and issue a
PULL request for the arm-soc tree.
diff mbox

Patch

--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -8,6 +8,8 @@ 
  * published by the Free Software Foundation.
  */
 
+#include <linux/types.h>
+
 #ifndef __ASSEMBLY__
 
 struct tag;