Mailing List Archive

[PATCH] Move include linux/marker.h to kernel.h
Move include linux/marker.h to kernel.h

* Andrew Morton (akpm@linux-foundation.org) wrote:
> Oh. One could whack [include linux/marker.h] in kernel.h: pretty
> much everything includes that.
>
> But it'd be better to simply require that the clients of this
> infrastructure include the appropriate header file. We do that for
> everything else and markers aren't special in this regard.

It seems like the logical solution. This patch moves this include from
Makefile to include/linux/kernel.h.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>

--- a/Makefile
+++ b/Makefile
@@ -308,9 +308,7 @@ AFLAGS_KERNEL =
# Needed to be compatible with the O= option
LINUXINCLUDE := -Iinclude \
$(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
- -include include/linux/autoconf.h \
- -include \
- $(if $(KBUILD_SRC),$(srctree)/)include/linux/marker.h
+ -include include/linux/autoconf.h

CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)

--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -14,6 +14,7 @@
#include <linux/compiler.h>
#include <linux/bitops.h>
#include <linux/log2.h>
+#include <linux/marker.h>
#include <asm/byteorder.h>
#include <asm/bug.h>


--
Mathieu Desnoyers
Computer Engineering Ph.D. Candidate, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
-
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/
Re: [PATCH] Move include linux/marker.h to kernel.h [ In reply to ]
On Fri, 16 Feb 2007 13:05:13 -0500 Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> wrote:

> Move include linux/marker.h to kernel.h
>
> * Andrew Morton (akpm@linux-foundation.org) wrote:
> > Oh. One could whack [include linux/marker.h] in kernel.h: pretty
> > much everything includes that.
> >
> > But it'd be better to simply require that the clients of this
> > infrastructure include the appropriate header file. We do that for
> > everything else and markers aren't special in this regard.
>
> It seems like the logical solution. This patch moves this include from
> Makefile to include/linux/kernel.h.
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
>
> --- a/Makefile
> +++ b/Makefile
> @@ -308,9 +308,7 @@ AFLAGS_KERNEL =
> # Needed to be compatible with the O= option
> LINUXINCLUDE := -Iinclude \
> $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
> - -include include/linux/autoconf.h \
> - -include \
> - $(if $(KBUILD_SRC),$(srctree)/)include/linux/marker.h
> + -include include/linux/autoconf.h
>
> CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
>
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -14,6 +14,7 @@
> #include <linux/compiler.h>
> #include <linux/bitops.h>
> #include <linux/log2.h>
> +#include <linux/marker.h>
> #include <asm/byteorder.h>
> #include <asm/bug.h>

No, that's still crufty. There's no reason why marker.h needs special
treatment whereas, say, jiffies.h does not (is there?)

It is conventional and reasonable to require that any code which uses this
mechanism must include its header file.

-
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/
Re: [PATCH] Move include linux/marker.h from Makefile [ In reply to ]
* Andrew Morton (akpm@linux-foundation.org) wrote:
> No, that's still crufty. There's no reason why marker.h needs special
> treatment whereas, say, jiffies.h does not (is there?)
>
> It is conventional and reasonable to require that any code which uses this
> mechanism must include its header file.
>

Ok, let's simply revert it then (and update the documentation
accordingly in a following patch).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>

--- a/Makefile
+++ b/Makefile
@@ -308,9 +308,7 @@ AFLAGS_KERNEL =
# Needed to be compatible with the O= option
LINUXINCLUDE := -Iinclude \
$(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
- -include include/linux/autoconf.h \
- -include \
- $(if $(KBUILD_SRC),$(srctree)/)include/linux/marker.h
+ -include include/linux/autoconf.h

CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)

--
Mathieu Desnoyers
Computer Engineering Ph.D. Candidate, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
-
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/
Re: [PATCH] Move include linux/marker.h to kernel.h [ In reply to ]
On Fri, 16 Feb 2007, Andrew Morton wrote:

> No, that's still crufty. There's no reason why marker.h needs special
> treatment whereas, say, jiffies.h does not (is there?)

Unforunately, even jiffies.h gets special treatment. sched.h still
includes jiffies.h, as this is where it was originally defined.

I've had that on my to-do list for some years now, but unfortunately it
will probably remain there for some more.
Somebody else who wants to check all files for properly including
jiffies.h and then remove the include from sched.h?

Thanks,
Tim
-
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/