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

Previous thread: [ !! PROPOSAL !! ] NMI & register handling infrastructure by Oza Oza on Monday, May 17, 2010 - 11:36 pm. (1 message)

Next thread: linux-next: build failure after merge of the driver-core tree by Stephen Rothwell on Monday, May 17, 2010 - 11:45 pm. (9 messages)
From: Stephen Rothwell
Date: Monday, May 17, 2010 - 11:44 pm

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).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
From: Greg KH
Date: Tuesday, May 18, 2010 - 7:02 am

Ick.

Chris, care to send a patch to resolve this?

thanks,

greg k-h
--

From: Chris Wright
Date: Tuesday, May 18, 2010 - 7:04 am

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

thanks,
-chris
--

From: Chris Wright
Date: Tuesday, May 18, 2010 - 2:06 pm

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

thanks,
-chris
--

From: Greg KH
Date: Tuesday, May 18, 2010 - 2:24 pm

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

thanks,

greg k-h
--

From: Chris Wright
Date: Tuesday, May 18, 2010 - 3:32 pm

Add missing forward declaration

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
 include/linux/sysfs.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 2a0d278..f06b1f1 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -86,6 +86,7 @@ struct attribute_group {
 
 #define attr_name(_attr) (_attr).attr.name
 
+struct file;
 struct vm_area_struct;
 
 struct bin_attribute {
--

From: Greg KH
Date: Thursday, May 20, 2010 - 10:36 am

Thanks, now merged in.

greg k-h
--

From: Chris Wright
Date: Thursday, May 20, 2010 - 11:39 am

Thanks Greg, sorry about the mess up.
-chris
--

Previous thread: [ !! PROPOSAL !! ] NMI & register handling infrastructure by Oza Oza on Monday, May 17, 2010 - 11:36 pm. (1 message)

Next thread: linux-next: build failure after merge of the driver-core tree by Stephen Rothwell on Monday, May 17, 2010 - 11:45 pm. (9 messages)