From 36920e069a87c6fccffbc0ec5e74985d94d3bcc4 Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki Date: Sun, 27 Aug 2006 01:23:52 -0700 Subject: [PATCH] [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 Acked-by: Yasunori Goto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/node.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/linux/node.h b/include/linux/node.h index 81dcec84cd8f..bc001bc225c3 100644 --- a/include/linux/node.h +++ b/include/linux/node.h @@ -30,12 +30,20 @@ extern struct node node_devices[]; extern int register_node(struct node *, int, struct node *); extern void unregister_node(struct node *node); +#ifdef CONFIG_NUMA extern int register_one_node(int nid); extern void unregister_one_node(int nid); -#ifdef CONFIG_NUMA extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); #else +static inline int register_one_node(int nid) +{ + return 0; +} +static inline int unregister_one_node(int nid) +{ + return 0; +} static inline int register_cpu_under_node(unsigned int cpu, unsigned int nid) { return 0; -- 2.34.1