Skip to contentSkip to conversation

cred: #include init.h in cred.h

PATCH In review Alexey Dobriyan 3 participants 5 messages May 9, 2009 – May 11, 2009 Credentials

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cred: #include init.h in cred.h

linux/cred.h can't be included as first header (alphabetical order) because it uses __init which is enough to break compilation on some archs.

---

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

commit f3e00c7d1ece60a019b15ea4992821834fe21a31

Author: Alexey Dobriyan <[email protected]>
Date:   Fri May 8 20:46:18 2009 +0400

cred.h: init.h

include/linux/cred.h +1 -0
@@ -13,6 +13,7 @@
 #define _LINUX_CRED_H
 
 #include <linux/capability.h>
+#include <linux/init.h>
 #include <linux/key.h>
 #include <asm/atomic.h>
 
#1 lore raw
Quoted 4 lines · On Sat, 9 May 2009 07:36:52 +0400 Alexey Dobriyan <[email protected]> wrote:

linux/cred.h can't be included as first header (alphabetical order) because it uses __init which is enough to break compilation on some archs.

hm, OK, not a lot of detail there though.

include/linux/cred.h line 18

Quoted 10 lines
include/linux/cred.h +1 -0
@@ -13,6 +13,7 @@
 #define _LINUX_CRED_H
 
 #include <linux/capability.h>
+#include <linux/init.h>
 #include <linux/key.h>
 #include <asm/atomic.h>

I assume that this is needed in 2.6.30?

#2 lore raw
Quoted 8 lines · Andrew Morton
Quoted 5 lines · On Sat, 9 May 2009 07:36:52 +0400 Alexey Dobriyan <[email protected]> wrote:
include/linux/cred.h +0 -0
@@ -13,6 +13,7 @@
 #define _LINUX_CRED_H
 
Quoted 6 lines

include/linux/cred.h line 18

Quoted 4 lines
include/linux/cred.h +1 -0
 #include <linux/capability.h>
+#include <linux/init.h>
 #include <linux/key.h>
 #include <asm/atomic.h>

I assume that this is needed in 2.6.30?

Would be nice.

Acked-by
#3 lore raw
In reply to Andrew Morton
Quoted 16 lines · Andrew Morton
Quoted 4 lines · On Sat, 9 May 2009 07:36:52 +0400 Alexey Dobriyan <[email protected]> wrote:

linux/cred.h can't be included as first header (alphabetical order) because it uses __init which is enough to break compilation on some archs.

hm, OK, not a lot of detail there though.

Quoted 6 lines
include/linux/cred.h +0 -0
@@ -13,6 +13,7 @@
 #define _LINUX_CRED_H
 
Quoted 7 lines

include/linux/cred.h line 18

Quoted 4 lines
include/linux/cred.h +1 -0
 #include <linux/capability.h>
+#include <linux/init.h>
 #include <linux/key.h>
 #include <asm/atomic.h>

I assume that this is needed in 2.6.30?

I can see it's in -mm, so might as well go to Linus via there.

Signature · 2 lines
James Morris
<[email protected]>
#4 lore raw
Quoted 26 lines · On Tue, 12 May 2009 08:32:31 +1000 (EST) James Morris <[email protected]> wrote:
Quoted 16 lines · Andrew Morton
Quoted 4 lines · On Sat, 9 May 2009 07:36:52 +0400 Alexey Dobriyan <[email protected]> wrote:

linux/cred.h can't be included as first header (alphabetical order) because it uses __init which is enough to break compilation on some archs.

hm, OK, not a lot of detail there though.

Quoted 6 lines
include/linux/cred.h +0 -0
@@ -13,6 +13,7 @@
 #define _LINUX_CRED_H
 
Quoted 7 lines

include/linux/cred.h line 18

Quoted 4 lines
include/linux/cred.h +1 -0
 #include <linux/capability.h>
+#include <linux/init.h>
 #include <linux/key.h>
 #include <asm/atomic.h>

I assume that this is needed in 2.6.30?

Quoted 1 line

I can see it's in -mm, so might as well go to Linus via there.

No prob.

Quoted 1 line

Thanks.

This is not the sort of patch which I'd send upstream immediately. cred.h is included by sched.h and sched.h doesn't include init.h. That's enough uncertainty to require a few days compile-testing..