From: Greg KH on
On Wed, Aug 11, 2010 at 03:01:02PM +0100, David Howells wrote:
> Break the kobject namespace defs into their own header to avoid a header file
> inclusion ordering problem between linux/sysfs.h and linux/kobject.h.

What "ordering problem" is there? I don't see a build error here, do
you?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: David Howells on
Greg KH <gregkh(a)suse.de> wrote:

> What "ordering problem" is there? I don't see a build error here, do
> you?

Yes:

CC arch/mn10300/kernel/asm-offsets.s
In file included from include/linux/kobject.h:21,
from include/linux/sched.h:91,
from arch/mn10300/kernel/asm-offsets.c:7:
include/linux/sysfs.h:177: warning: parameter 1 ('type') has incomplete type
GEN include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
<stdin>:1526:2: warning: #warning syscall fanotify_init not implemented
<stdin>:1530:2: warning: #warning syscall fanotify_mark not implemented
<stdin>:1534:2: warning: #warning syscall prlimit64 not implemented
CC init/main.o
CC arch/mn10300/mm/init.o
CC arch/mn10300/kernel/process.o
In file included from include/linux/kobject.h:21,
from include/linux/sched.h:91,
from include/linux/utsname.h:35,
from /warthog/am33/linux-2.6-mn10300/arch/mn10300/include/asm/elf.h:15,
from include/linux/elf.h:7,
from include/linux/module.h:14,
from init/main.c:13:
include/linux/sysfs.h:177: warning: parameter 1 ('type') has incomplete type
In file included from include/linux/kobject.h:21,
from include/linux/sched.h:91,
from arch/mn10300/mm/init.c:13:
include/linux/sysfs.h:177: warning: parameter 1 ('type') has incomplete type
In file included from include/linux/kobject.h:21,
from include/linux/sched.h:91,
from include/linux/utsname.h:35,
from /warthog/am33/linux-2.6-mn10300/arch/mn10300/include/asm/elf.h:15,
from include/linux/elf.h:7,
from include/linux/module.h:14,
from arch/mn10300/kernel/process.c:11:
include/linux/sysfs.h:177: warning: parameter 1 ('type') has incomplete type
....


The problem appears to be that

enum kobj_ns_type

is defined in linux/kobject.h but referenced in linux/sysfs.h, which is
included by linux/kobject.h. Whilst I see a predeclaration at the top of
linux/sysfs.h, my compiler seems to ignore it.

The compiler is:

gcc version 3.4-am33-04r2-5

which is a supported version according to the compiler-gcc3.h header file.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Greg KH on
On Thu, Aug 12, 2010 at 12:56:25PM +0100, David Howells wrote:
>
> The compiler is:
>
> gcc version 3.4-am33-04r2-5
>
> which is a supported version according to the compiler-gcc3.h header file.

Ah, yeah, it's a gcc thing. I'll queue this up.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/