Skip to contentSkip to conversation

smp_lock.h: Avoid recursive include

PATCH In review Geert Uytterhoeven 2 participants 3 messages Oct 31, 2004 – Nov 2, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 smp_lock.h: Avoid recursive include

smp_lock.h: Avoid recursive include

include/linux/smp_lock.h +0 -1
@@ -2,7 +2,6 @@
 #define __LINUX_SMPLOCK_H
 
 #include <linux/config.h>
-#include <linux/sched.h>
 #include <linux/spinlock.h>
 
 #if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#1 lore raw

Re: [PATCH 504] m68k: smp_lock.h: Avoid recursive include

This one is _totally_ broken.

Not only is that include not recursive, but it immediately breaks any SMP compile because that header file _needs_ the definition of "task_struct".

I applied it without realizing it, but I'll undo it and I hope you fix your broken tree so that I don't ever have to see this broken patch again..

Linus

Quoted 29 lines · Geert Uytterhoeven

smp_lock.h: Avoid recursive include

include/linux/smp_lock.h +0 -1
@@ -2,7 +2,6 @@
 #define __LINUX_SMPLOCK_H
 
 #include <linux/config.h>
-#include <linux/sched.h>
 #include <linux/spinlock.h>
 
 #if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw

Re: [PATCH 504] m68k: smp_lock.h: Avoid recursive include

Quoted 1 line · Linus Torvalds

Not only is that include not recursive, but it immediately breaks any SMP

It's not immediately recursive, but <linux/sched.h> includes about everything and the kitchen sink, causing fatal problems on m68k since 2.6.9*...

Quoted 1 line

compile because that header file _needs_ the definition of "task_struct".

Sorry, forgot about SMP.

So we have to move the definition of "task_struct" to <linux/task_struct.h> first, to avoid include hell. Cfr. what Roman Zippel is working on.

Quoted 3 lines

I applied it without realizing it, but I'll undo it and I hope you fix your broken tree so that I don't ever have to see this broken patch again..

Don't worry, it has been moved to my POSTPONED queue :-)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds