[PATCH] register_one_node() compile fix

register_one_node()'s should be defined under CONFIG_NUMA=n.
fixes following bug.

CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
mm/built-in.o: In function `add_memory': undefined reference to `register_one_node'

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by KAMEZAWA Hiroyuki and committed by Linus Torvalds 36920e06 ea817398

+9 -1
+9 -1
include/linux/node.h
··· 30 30 31 31 extern int register_node(struct node *, int, struct node *); 32 32 extern void unregister_node(struct node *node); 33 + #ifdef CONFIG_NUMA 33 34 extern int register_one_node(int nid); 34 35 extern void unregister_one_node(int nid); 35 - #ifdef CONFIG_NUMA 36 36 extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); 37 37 extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); 38 38 #else 39 + static inline int register_one_node(int nid) 40 + { 41 + return 0; 42 + } 43 + static inline int unregister_one_node(int nid) 44 + { 45 + return 0; 46 + } 39 47 static inline int register_cpu_under_node(unsigned int cpu, unsigned int nid) 40 48 { 41 49 return 0;