[PATCH -next] arch_numa: Fix section mismatch warning

Jinjie Ruan posted 1 patch 1 year, 4 months ago
include/asm-generic/numa.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH -next] arch_numa: Fix section mismatch warning
Posted by Jinjie Ruan 1 year, 4 months ago
With CONFIG_NUMA_EMU=y, the following compile warning occurs on ARM64,
remove the __init of early_cpu_to_node() to fix it.

	WARNING: modpost: vmlinux: section mismatch in reference: numa_add_cpu+0x24 (section: .text) -> early_cpu_to_node (section: .init.text)

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
 include/asm-generic/numa.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/numa.h b/include/asm-generic/numa.h
index c2b046d1fd82..e063d6487f66 100644
--- a/include/asm-generic/numa.h
+++ b/include/asm-generic/numa.h
@@ -33,7 +33,7 @@ static inline const struct cpumask *cpumask_of_node(int node)
 void __init arch_numa_init(void);
 int __init numa_add_memblk(int nodeid, u64 start, u64 end);
 void __init early_map_cpu_to_node(unsigned int cpu, int nid);
-int __init early_cpu_to_node(int cpu);
+int early_cpu_to_node(int cpu);
 void numa_store_cpu_info(unsigned int cpu);
 void numa_add_cpu(unsigned int cpu);
 void numa_remove_cpu(unsigned int cpu);
-- 
2.34.1