lkml.org 
[lkml]   [2005]   [Aug]   [8]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 8 Aug 2005 09:18:19 +0200 (MEST)
FromJan Engelhardt <>
SubjectRe: Inclusion order patch
>This patch lets this header stand alone, since I can never remember
>which other headers to include, or in which order.
I have seen the same in a lot of other places. For some self-baked patch, I 
added <linux/security.h> to the front of includes and promptly got flooded 
with warnings.

IMO, every H (and every C) file should have all the includes that are 
necessary to get at enums, structs, etc. even if other H files do this.
I'd volunteer to do this. What's LKMLs and the big guys' opinion?

>@@ -2,6 +2,12 @@> #define _LINUX_CDEV_H> #ifdef __KERNEL__>>+#include <linux/kobject.h>>+#include <linux/list.h>>+#include <linux/types.h>>+>+struct inode;

+ struct module;

>+> struct cdev {>        struct kobject kobj;
>        struct module *owner;


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

\
 
 \ /
  Last update: 2005-08-08 09:20    [from the cache]
©2003-2008