Skip to contentSkip to conversation

Fix missing include of list.h in sysfs.h

PATCH In review Frank Haverkamp 2 participants 3 messages Jan 17, 2007 – Jan 18, 2007 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix missing include of list.h in sysfs.h

Sysfs.h uses definitions (e.g. struct list_head s_sibling) from list.h but does not include it.

---
 include/linux/sysfs.h |    1 +
 1 file changed, 1 insertion(+)
include/linux/sysfs.h +1 -0
@@ -11,6 +11,7 @@
 #define _SYSFS_H_
 
 #include <linux/compiler.h>
+#include <linux/list.h>
 #include <asm/atomic.h>
 
 struct kobject;
#1 lore raw
Quoted 11 lines · Frank Haverkamp

Sysfs.h uses definitions (e.g. struct list_head s_sibling) from list.h but does not include it.

---
 include/linux/sysfs.h |    1 +
 1 file changed, 1 insertion(+)

include/linux/sysfs.h line 15

Quoted 5 lines
include/linux/sysfs.h +1 -0
@@ -11,6 +11,7 @@
 #define _SYSFS_H_
 
 #include <linux/compiler.h>
+#include <linux/list.h>
 #include <asm/atomic.h>

Does this currently cause a build error on any platform for 2.6.20-rc5?

thanks,

greg k-h

#2 lore raw

Hi Greg,

Quoted 1 line · Greg KH

Does this currently cause a build error on any platform for 2.6.20-rc5?

Not that I know of. I saw it because a friend of mine tried to port some old code and played with the include ordering. Somehow he got a compile error doing it, and we found that it is strange that sysfs.h is using structs from list.h but is not including it. As result I sent the patch to propose that it gets included to avoid any possible trouble.

Frank