Skip to contentSkip to conversation

linux-next: build failure after merge of the driver-core tree

PATCH In review Stephen Rothwell 3 participants 8 messages May 18, 2010 – May 20, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Greg,

After merging the driver-core tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

cc1: warnings being treated as errors
In file included from include/linux/kobject.h:21,
from include/linux/device.h:17,
from arch/powerpc/lib/devres.c:10:
include/linux/sysfs.h:97: error: 'struct file' declared inside parameter list include/linux/sysfs.h:97: error: its scope is only this definition or declaration, which is probably not what you want include/linux/sysfs.h:99: error: 'struct file' declared inside parameter list include/linux/sysfs.h:101: error: 'struct file' declared inside parameter list

and many more (arch/powerpc is built with -Werror (as do some other architectures)) and lots of similar warnings ...

Caused by commit f8e898186196a22756b50b908ecd92123265f8a2 ("sysfs: add
struct file* to bin_attr callbacks"). See Rule 1 in
Documentation/SubmitChecklist. The header file probably just needs "struct file;" added in the right place.

I have reverted that commit for today (and commit 44e425ab9f887ec6d3a7a4481f3b0c99f120de19 ("pci: check caps from sysfs file open to read device dependent config space") that depends on it).

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
#1 lore raw
Quoted 17 lines · Stephen Rothwell

Hi Greg,

After merging the driver-core tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

cc1: warnings being treated as errors
In file included from include/linux/kobject.h:21,
from include/linux/device.h:17,
from arch/powerpc/lib/devres.c:10:
include/linux/sysfs.h:97: error: 'struct file' declared inside parameter list include/linux/sysfs.h:97: error: its scope is only this definition or declaration, which is probably not what you want include/linux/sysfs.h:99: error: 'struct file' declared inside parameter list include/linux/sysfs.h:101: error: 'struct file' declared inside parameter list

and many more (arch/powerpc is built with -Werror (as do some other architectures)) and lots of similar warnings ...

Quoted 8 lines

Caused by commit f8e898186196a22756b50b908ecd92123265f8a2 ("sysfs: add
struct file* to bin_attr callbacks"). See Rule 1 in
Documentation/SubmitChecklist. The header file probably just needs "struct file;" added in the right place.

I have reverted that commit for today (and commit 44e425ab9f887ec6d3a7a4481f3b0c99f120de19 ("pci: check caps from sysfs file open to read device dependent config space") that depends on it).

Ick.

Chris, care to send a patch to resolve this?

thanks,

greg k-h

#2 lore raw
Quoted 23 lines · * Greg KH ([email protected]) wrote:
Quoted 22 lines · Stephen Rothwell

Hi Greg,

After merging the driver-core tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

cc1: warnings being treated as errors
In file included from include/linux/kobject.h:21,
from include/linux/device.h:17,
from arch/powerpc/lib/devres.c:10:
include/linux/sysfs.h:97: error: 'struct file' declared inside parameter list include/linux/sysfs.h:97: error: its scope is only this definition or declaration, which is probably not what you want include/linux/sysfs.h:99: error: 'struct file' declared inside parameter list include/linux/sysfs.h:101: error: 'struct file' declared inside parameter list

and many more (arch/powerpc is built with -Werror (as do some other architectures)) and lots of similar warnings ...

Caused by commit f8e898186196a22756b50b908ecd92123265f8a2 ("sysfs: add
struct file* to bin_attr callbacks"). See Rule 1 in
Documentation/SubmitChecklist. The header file probably just needs "struct file;" added in the right place.

Quoted 7 lines
Quoted 3 lines

I have reverted that commit for today (and commit 44e425ab9f887ec6d3a7a4481f3b0c99f120de19 ("pci: check caps from sysfs file open to read device dependent config space") that depends on it).

Ick.

Chris, care to send a patch to resolve this?

Yeah, I'll see where the header is missing.

thanks,
-chris

#3 lore raw
In reply to Greg KH
Quoted 23 lines · * Greg KH ([email protected]) wrote:
Quoted 22 lines · Stephen Rothwell

Hi Greg,

After merging the driver-core tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

cc1: warnings being treated as errors
In file included from include/linux/kobject.h:21,
from include/linux/device.h:17,
from arch/powerpc/lib/devres.c:10:
include/linux/sysfs.h:97: error: 'struct file' declared inside parameter list include/linux/sysfs.h:97: error: its scope is only this definition or declaration, which is probably not what you want include/linux/sysfs.h:99: error: 'struct file' declared inside parameter list include/linux/sysfs.h:101: error: 'struct file' declared inside parameter list

and many more (arch/powerpc is built with -Werror (as do some other architectures)) and lots of similar warnings ...

Caused by commit f8e898186196a22756b50b908ecd92123265f8a2 ("sysfs: add
struct file* to bin_attr callbacks"). See Rule 1 in
Documentation/SubmitChecklist. The header file probably just needs "struct file;" added in the right place.

Quoted 7 lines
Quoted 3 lines

I have reverted that commit for today (and commit 44e425ab9f887ec6d3a7a4481f3b0c99f120de19 ("pci: check caps from sysfs file open to read device dependent config space") that depends on it).

Ick.

Chris, care to send a patch to resolve this?

Would you prefer incremental to fold in, or respin? It's just this one-liner fwd declaration as Stephen mentioned.

thanks,
-chris

#4 lore raw
Quoted 28 lines · Chris Wright
Quoted 27 lines · * Greg KH ([email protected]) wrote:
Quoted 25 lines · Stephen Rothwell

Hi Greg,

After merging the driver-core tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

cc1: warnings being treated as errors
In file included from include/linux/kobject.h:21,
from include/linux/device.h:17,
from arch/powerpc/lib/devres.c:10:
include/linux/sysfs.h:97: error: 'struct file' declared inside parameter list include/linux/sysfs.h:97: error: its scope is only this definition or declaration, which is probably not what you want include/linux/sysfs.h:99: error: 'struct file' declared inside parameter list include/linux/sysfs.h:101: error: 'struct file' declared inside parameter list

and many more (arch/powerpc is built with -Werror (as do some other architectures)) and lots of similar warnings ...

Caused by commit f8e898186196a22756b50b908ecd92123265f8a2 ("sysfs: add
struct file* to bin_attr callbacks"). See Rule 1 in
Documentation/SubmitChecklist. The header file probably just needs "struct file;" added in the right place.

I have reverted that commit for today (and commit 44e425ab9f887ec6d3a7a4481f3b0c99f120de19 ("pci: check caps from sysfs file open to read device dependent config space") that depends on it).

Quoted 6 lines
Quoted 3 lines

Ick.

Chris, care to send a patch to resolve this?

Would you prefer incremental to fold in, or respin? It's just this one-liner fwd declaration as Stephen mentioned.

Incremental to fold in is easier. That way there's no build error in the tree.

thanks,

greg k-h

#5 lore raw

PATCH 1/1 sysfs: compile fix, struct file forward declaration

Quoted 13 lines · Stephen Rothwell

After merging the driver-core tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

cc1: warnings being treated as errors
In file included from include/linux/kobject.h:21,
from include/linux/device.h:17,
from arch/powerpc/lib/devres.c:10:
include/linux/sysfs.h:97: error: 'struct file' declared inside parameter list include/linux/sysfs.h:97: error: its scope is only this definition or declaration, which is probably not what you want include/linux/sysfs.h:99: error: 'struct file' declared inside parameter list include/linux/sysfs.h:101: error: 'struct file' declared inside parameter list

Quoted 2 lines

and many more (arch/powerpc is built with -Werror (as do some other architectures)) and lots of similar warnings ...

Add missing forward declaration

---
 include/linux/sysfs.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
include/linux/sysfs.h +1 -0
index 2a0d278..f06b1f1 100644
@@ -86,6 +86,7 @@ struct attribute_group {
 
 #define attr_name(_attr) (_attr).attr.name
 
+struct file;
 struct vm_area_struct;
 
 struct bin_attribute {
#6 lore raw

Re: [PATCH] sysfs: compile fix, struct file forward declaration

Quoted 14 lines · Chris Wright
Quoted 13 lines · Stephen Rothwell

After merging the driver-core tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

cc1: warnings being treated as errors
In file included from include/linux/kobject.h:21,
from include/linux/device.h:17,
from arch/powerpc/lib/devres.c:10:
include/linux/sysfs.h:97: error: 'struct file' declared inside parameter list include/linux/sysfs.h:97: error: its scope is only this definition or declaration, which is probably not what you want include/linux/sysfs.h:99: error: 'struct file' declared inside parameter list include/linux/sysfs.h:101: error: 'struct file' declared inside parameter list

Quoted 6 lines
Quoted 2 lines

and many more (arch/powerpc is built with -Werror (as do some other architectures)) and lots of similar warnings ...

Add missing forward declaration

Thanks, now merged in.

greg k-h

#7 lore raw

Re: [PATCH] sysfs: compile fix, struct file forward declaration

Quoted 15 lines · * Greg KH ([email protected]) wrote:
Quoted 14 lines · Chris Wright
Quoted 13 lines · Stephen Rothwell

After merging the driver-core tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

cc1: warnings being treated as errors
In file included from include/linux/kobject.h:21,
from include/linux/device.h:17,
from arch/powerpc/lib/devres.c:10:
include/linux/sysfs.h:97: error: 'struct file' declared inside parameter list include/linux/sysfs.h:97: error: its scope is only this definition or declaration, which is probably not what you want include/linux/sysfs.h:99: error: 'struct file' declared inside parameter list include/linux/sysfs.h:101: error: 'struct file' declared inside parameter list

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

and many more (arch/powerpc is built with -Werror (as do some other architectures)) and lots of similar warnings ...

Add missing forward declaration

Thanks, now merged in.

Thanks Greg, sorry about the mess up.
-chris