Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <lacombar@gmail.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Arnaud Lacombe and committed by
Linus Torvalds
b9d4f426 9d00f92f

+21 -22
+21 -22
include/linux/kernel.h
··· 691 691 #endif 692 692 #endif /* __CHECKER__ */ 693 693 694 + /* Trap pasters of __FUNCTION__ at compile-time */ 695 + #define __FUNCTION__ (__func__) 696 + 697 + /* This helps us to avoid #ifdef CONFIG_NUMA */ 698 + #ifdef CONFIG_NUMA 699 + #define NUMA_BUILD 1 700 + #else 701 + #define NUMA_BUILD 0 702 + #endif 703 + 704 + /* This helps us avoid #ifdef CONFIG_COMPACTION */ 705 + #ifdef CONFIG_COMPACTION 706 + #define COMPACTION_BUILD 1 707 + #else 708 + #define COMPACTION_BUILD 0 709 + #endif 710 + 711 + /* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */ 712 + #ifdef CONFIG_FTRACE_MCOUNT_RECORD 713 + # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD 714 + #endif 694 715 695 716 struct sysinfo; 696 717 extern int do_sysinfo(struct sysinfo *info); ··· 735 714 unsigned int mem_unit; /* Memory unit size in bytes */ 736 715 char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ 737 716 }; 738 - 739 - /* Trap pasters of __FUNCTION__ at compile-time */ 740 - #define __FUNCTION__ (__func__) 741 - 742 - /* This helps us to avoid #ifdef CONFIG_NUMA */ 743 - #ifdef CONFIG_NUMA 744 - #define NUMA_BUILD 1 745 - #else 746 - #define NUMA_BUILD 0 747 - #endif 748 - 749 - /* This helps us avoid #ifdef CONFIG_COMPACTION */ 750 - #ifdef CONFIG_COMPACTION 751 - #define COMPACTION_BUILD 1 752 - #else 753 - #define COMPACTION_BUILD 0 754 - #endif 755 - 756 - /* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */ 757 - #ifdef CONFIG_FTRACE_MCOUNT_RECORD 758 - # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD 759 - #endif 760 717 761 718 #endif