2010-08-17 02:17:58

by Chris Frey

[permalink] [raw]
Subject: compiler warnings in 2.6.35.2

Hi,

When compiling the latest 2.6.35.2 I get a ton of warnings like the
following. Similar warnings were present in 2.6.35, and I assumed a
stable point release may have tackled them already. But maybe they
are peculiar to my setup. Warning below.

- Chris



CC mm/swap.o
In file included from include/linux/kobject.h:21,
from include/linux/sched.h:91,
from mm/swap.c:17:
include/linux/sysfs.h:183: warning: parameter has incomplete type
/home/cdfrey/kernel/git/linux/arch/x86/include/asm/cpufeature.h: In function `__static_cpu_has':
/home/cdfrey/kernel/git/linux/arch/x86/include/asm/cpufeature.h:315: warning: asm operand 1 probably doesn't match constraints


2010-08-17 05:35:03

by Borislav Petkov

[permalink] [raw]
Subject: Re: compiler warnings in 2.6.35.2

From: Chris Frey <[email protected]>
Date: Mon, Aug 16, 2010 at 10:12:52PM -0400

> Hi,
>
> When compiling the latest 2.6.35.2 I get a ton of warnings like the
> following. Similar warnings were present in 2.6.35, and I assumed a
> stable point release may have tackled them already. But maybe they
> are peculiar to my setup. Warning below.
>
> - Chris
>
>
>
> CC mm/swap.o
> In file included from include/linux/kobject.h:21,
> from include/linux/sched.h:91,
> from mm/swap.c:17:
> include/linux/sysfs.h:183: warning: parameter has incomplete type
> /home/cdfrey/kernel/git/linux/arch/x86/include/asm/cpufeature.h: In function `__static_cpu_has':
> /home/cdfrey/kernel/git/linux/arch/x86/include/asm/cpufeature.h:315: warning: asm operand 1 probably doesn't match constraints

Which compiler version are you using?

--
Regards/Gruss,
Boris.

2010-08-17 06:28:19

by Chris Frey

[permalink] [raw]
Subject: Re: compiler warnings in 2.6.35.2

On Tue, Aug 17, 2010 at 07:34:56AM +0200, Borislav Petkov wrote:
> From: Chris Frey <[email protected]>
> Date: Mon, Aug 16, 2010 at 10:12:52PM -0400
>
> > CC mm/swap.o
> > In file included from include/linux/kobject.h:21,
> > from include/linux/sched.h:91,
> > from mm/swap.c:17:
> > include/linux/sysfs.h:183: warning: parameter has incomplete type
> > /home/cdfrey/kernel/git/linux/arch/x86/include/asm/cpufeature.h: In function `__static_cpu_has':
> > /home/cdfrey/kernel/git/linux/arch/x86/include/asm/cpufeature.h:315: warning: asm operand 1 probably doesn't match constraints
>
> Which compiler version are you using?

GCC 3.3

- Chris

2010-08-17 06:32:04

by Borislav Petkov

[permalink] [raw]
Subject: Re: compiler warnings in 2.6.35.2

From: Chris Frey <[email protected]>
Date: Tue, Aug 17, 2010 at 02:28:01AM -0400

> > > CC mm/swap.o
> > > In file included from include/linux/kobject.h:21,
> > > from include/linux/sched.h:91,
> > > from mm/swap.c:17:
> > > include/linux/sysfs.h:183: warning: parameter has incomplete type
> > > /home/cdfrey/kernel/git/linux/arch/x86/include/asm/cpufeature.h: In function `__static_cpu_has':
> > > /home/cdfrey/kernel/git/linux/arch/x86/include/asm/cpufeature.h:315: warning: asm operand 1 probably doesn't match constraints
> >
> > Which compiler version are you using?
>
> GCC 3.3

Any chance to upgrade to a 4.x version?

--
Regards/Gruss,
Boris.

2010-08-17 15:53:48

by Chris Frey

[permalink] [raw]
Subject: Re: compiler warnings in 2.6.35.2

On Tue, Aug 17, 2010 at 08:31:59AM +0200, Borislav Petkov wrote:
> From: Chris Frey <[email protected]>
> Date: Tue, Aug 17, 2010 at 02:28:01AM -0400
>
> > > > CC mm/swap.o
> > > > In file included from include/linux/kobject.h:21,
> > > > from include/linux/sched.h:91,
> > > > from mm/swap.c:17:
> > > > include/linux/sysfs.h:183: warning: parameter has incomplete type
> > > > /home/cdfrey/kernel/git/linux/arch/x86/include/asm/cpufeature.h: In function `__static_cpu_has':
> > > > /home/cdfrey/kernel/git/linux/arch/x86/include/asm/cpufeature.h:315: warning: asm operand 1 probably doesn't match constraints
> > >
> > > Which compiler version are you using?
> >
> > GCC 3.3
>
> Any chance to upgrade to a 4.x version?

I could, but Documentation/Changes says gcc 3.2 is the minimum, so I hoped
3.3 would be sufficient.

As for the first warning, doesn't it just need include/linux/kobject.h
to be included for the enum type?

As for the second warning, I'm not sure I even understand it.

- Chris

2010-08-17 16:20:57

by Borislav Petkov

[permalink] [raw]
Subject: Re: compiler warnings in 2.6.35.2

From: Chris Frey <[email protected]>
Date: Tue, Aug 17, 2010 at 11:53:33AM -0400

> > > > > CC mm/swap.o
> > > > > In file included from include/linux/kobject.h:21,
> > > > > from include/linux/sched.h:91,
> > > > > from mm/swap.c:17:
> > > > > include/linux/sysfs.h:183: warning: parameter has incomplete type
> > > > > /home/cdfrey/kernel/git/linux/arch/x86/include/asm/cpufeature.h: In function `__static_cpu_has':
> > > > > /home/cdfrey/kernel/git/linux/arch/x86/include/asm/cpufeature.h:315: warning: asm operand 1 probably doesn't match constraints
> > > >
> > > > Which compiler version are you using?
> > >
> > > GCC 3.3
> >
> > Any chance to upgrade to a 4.x version?
>
> I could, but Documentation/Changes says gcc 3.2 is the minimum, so I hoped
> 3.3 would be sufficient.

This is actually something we're looking to change now:
http://lkml.indiana.edu/hypermail/linux/kernel/1005.2/01239.html

@hpa: there are some gcc3.x users left, obviously.

>
> As for the first warning, doesn't it just need include/linux/kobject.h
> to be included for the enum type?

This is a gcc 3.x problem AFAIK.

> As for the second warning, I'm not sure I even understand it.

Ditto.

So why do you want to stay with 3.x anyway?

--
Regards/Gruss,
Boris.

2010-08-17 18:16:38

by Anca Emanuel

[permalink] [raw]
Subject: Re: compiler warnings in 2.6.35.2

On Tue, Aug 17, 2010 at 7:20 PM, Borislav Petkov <[email protected]> wrote:
> So why do you want to stay with 3.x anyway?

Read this: http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.36-rc1-maverick/BUILD.LOG
Search for warnings.
I tried to complile myself (using ubuntu 10.10 with latest updates),
but failed at some staging driver. After uncheked the staging drivers,
still failure.
I'm using kernel 2.6.36-rc1 from
http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.36-rc1-maverick/

2010-08-17 18:45:55

by Borislav Petkov

[permalink] [raw]
Subject: Re: compiler warnings in 2.6.35.2

From: Anca Emanuel <[email protected]>
Date: Tue, Aug 17, 2010 at 08:15:21PM +0300

> On Tue, Aug 17, 2010 at 7:20 PM, Borislav Petkov <[email protected]> wrote:
> > So why do you want to stay with 3.x anyway?
>
> Read this: http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.36-rc1-maverick/BUILD.LOG
> Search for warnings.
> I tried to complile myself (using ubuntu 10.10 with latest updates),
> but failed at some staging driver. After uncheked the staging drivers,
> still failure.
> I'm using kernel 2.6.36-rc1 from
> http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.36-rc1-maverick/

Can you please elaborate a bit more, what are you trying to show here?

--
Regards/Gruss,
Boris.

2010-08-17 19:09:44

by Anca Emanuel

[permalink] [raw]
Subject: Re: compiler warnings in 2.6.35.2

On Tue, Aug 17, 2010 at 9:45 PM, Borislav Petkov <[email protected]> wrote:
> From: Anca Emanuel <[email protected]>
> Date: Tue, Aug 17, 2010 at 08:15:21PM +0300
>
>> On Tue, Aug 17, 2010 at 7:20 PM, Borislav Petkov <[email protected]> wrote:
>> > So why do you want to stay with 3.x anyway?
>>
>> Read this: http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.36-rc1-maverick/BUILD.LOG
>> Search for warnings.
>> I tried to complile myself (using ubuntu 10.10 with latest updates),
>> but failed at some staging driver. After uncheked the staging drivers,
>> still failure.
>> I'm using kernel 2.6.36-rc1 from
>> http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.36-rc1-maverick/
>
> Can you please elaborate a bit more, what are you trying to show here?
>
> --
> Regards/Gruss,
> ? ?Boris.
>

Steps to reproduce:
1. Install Ubuntu 10.04, and upgrade to 10.10
2. Use this tutorial to compile the kernel:
https://wiki.ubuntu.com/KernelTeam/GitKernelBuild

There is a lot of compiler warnings, and this problem is not new.
I think that is enough for this moment.

( If you can boot from it please show how did you do it )

2010-08-18 13:35:40

by Greg KH

[permalink] [raw]
Subject: Re: compiler warnings in 2.6.35.2

On Mon, Aug 16, 2010 at 10:12:52PM -0400, Chris Frey wrote:
> Hi,
>
> When compiling the latest 2.6.35.2 I get a ton of warnings like the
> following. Similar warnings were present in 2.6.35, and I assumed a
> stable point release may have tackled them already. But maybe they
> are peculiar to my setup. Warning below.
>
> - Chris
>
>
>
> CC mm/swap.o
> In file included from include/linux/kobject.h:21,
> from include/linux/sched.h:91,
> from mm/swap.c:17:
> include/linux/sysfs.h:183: warning: parameter has incomplete type

Known issue, will show up in a future .35.y kernel release. The patch
is below if you need it now.

thanks,

greg k-h


Attachments:
(No filename) (696.00 B)
kobject-break-the-kobject-namespace-defs-into-their-own-header.patch (4.66 kB)
Download all attachments