From: Arnaud Lacombe Date: Tue, 26 Jul 2011 00:13:03 +0000 (-0700) Subject: include/linux/kernel.h: hide internal macros from userspace X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b9d4f426689765d1e066913f6872c8d59e0f2ac9;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git include/linux/kernel.h: hide internal macros from userspace Unexpose to userland the following macros - __FUNCTION__ - NUMA_BUILD - COMPACTION_BUILD - REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD Signed-off-by: Arnaud Lacombe Cc: Rusty Russell Cc: KOSAKI Motohiro Cc: Christoph Lameter Cc: Mel Gorman Cc: Steven Rostedt Acked-by: WANG Cong Cc: Michal Marek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/kernel.h b/include/linux/kernel.h index bf66f068368b..9a43ad792cfc 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -691,6 +691,27 @@ extern int __build_bug_on_failed; #endif #endif /* __CHECKER__ */ +/* Trap pasters of __FUNCTION__ at compile-time */ +#define __FUNCTION__ (__func__) + +/* This helps us to avoid #ifdef CONFIG_NUMA */ +#ifdef CONFIG_NUMA +#define NUMA_BUILD 1 +#else +#define NUMA_BUILD 0 +#endif + +/* This helps us avoid #ifdef CONFIG_COMPACTION */ +#ifdef CONFIG_COMPACTION +#define COMPACTION_BUILD 1 +#else +#define COMPACTION_BUILD 0 +#endif + +/* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */ +#ifdef CONFIG_FTRACE_MCOUNT_RECORD +# define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD +#endif struct sysinfo; extern int do_sysinfo(struct sysinfo *info); @@ -715,26 +736,4 @@ struct sysinfo { char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ }; -/* Trap pasters of __FUNCTION__ at compile-time */ -#define __FUNCTION__ (__func__) - -/* This helps us to avoid #ifdef CONFIG_NUMA */ -#ifdef CONFIG_NUMA -#define NUMA_BUILD 1 -#else -#define NUMA_BUILD 0 -#endif - -/* This helps us avoid #ifdef CONFIG_COMPACTION */ -#ifdef CONFIG_COMPACTION -#define COMPACTION_BUILD 1 -#else -#define COMPACTION_BUILD 0 -#endif - -/* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */ -#ifdef CONFIG_FTRACE_MCOUNT_RECORD -# define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD -#endif - #endif