The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] kobject: Suppress compiler warning with gcc 3.x
@ 2010-06-03  5:23 Tetsuo Handa
  2010-06-03  5:31 ` Eric Dumazet
  0 siblings, 1 reply; 10+ messages in thread
From: Tetsuo Handa @ 2010-06-03  5:23 UTC (permalink / raw)
  To: ebiederm, randy.dunlap, gregkh; +Cc: linux-kernel

Gcc 3.x generates a warning

  include/linux/sysfs.h:183: warning: parameter has incomplete type

on each file.
Suppress the warning by moving the definition of "enum kobj_ns_type"
to before "#include <linux/sysfs.h>".

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
---
 include/linux/kobject.h |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

--- linux-2.6.35-rc1.orig/include/linux/kobject.h
+++ linux-2.6.35-rc1/include/linux/kobject.h
@@ -16,6 +16,16 @@
 #ifndef _KOBJECT_H_
 #define _KOBJECT_H_
 
+/*
+ * Namespace types which are used to tag kobjects and sysfs entries.
+ * Network namespace will likely be the first.
+ */
+enum kobj_ns_type {
+	KOBJ_NS_TYPE_NONE = 0,
+	KOBJ_NS_TYPE_NET,
+	KOBJ_NS_TYPES
+};
+
 #include <linux/types.h>
 #include <linux/list.h>
 #include <linux/sysfs.h>
@@ -136,16 +146,6 @@ struct kobj_attribute {
 
 extern const struct sysfs_ops kobj_sysfs_ops;
 
-/*
- * Namespace types which are used to tag kobjects and sysfs entries.
- * Network namespace will likely be the first.
- */
-enum kobj_ns_type {
-	KOBJ_NS_TYPE_NONE = 0,
-	KOBJ_NS_TYPE_NET,
-	KOBJ_NS_TYPES
-};
-
 struct sock;
 
 /*

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-06-03  9:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-03  5:23 [PATCH] kobject: Suppress compiler warning with gcc 3.x Tetsuo Handa
2010-06-03  5:31 ` Eric Dumazet
2010-06-03  5:55   ` Américo Wang
2010-06-03  6:02     ` Eric W. Biederman
2010-06-03  6:23       ` Américo Wang
2010-06-03  6:40         ` Eric W. Biederman
2010-06-03  8:57           ` Américo Wang
2010-06-03  9:32             ` Eric Dumazet
2010-06-03  6:46         ` Eric Dumazet
2010-06-03  8:52           ` Américo Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox