aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-27 18:23:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-27 18:23:32 -0400
commit7ded384a12688c2a86b618da16bc87713404dfcc (patch)
treeddfb19e97fe455c6826b3a4de136195bde184338
parentaf7d93729c7c2beadea8ec5a6e66c53bef0e6290 (diff)
mm: fix section mismatch warning
The register_page_bootmem_info_node() function needs to be marked __init in order to avoid a new warning introduced by commit f65e91df25aa ("mm: use early_pfn_to_nid in register_page_bootmem_info_node"). Otherwise you'll get a warning about how a non-init function calls early_pfn_to_nid (which is __meminit) Cc: Yang Shi <yang.shi@linaro.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/memory_hotplug.h2
-rw-r--r--mm/memory_hotplug.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 20d8a5d4d133..5145620ba48a 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -182,7 +182,7 @@ static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
182#endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */ 182#endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */
183 183
184#ifdef CONFIG_HAVE_BOOTMEM_INFO_NODE 184#ifdef CONFIG_HAVE_BOOTMEM_INFO_NODE
185extern void register_page_bootmem_info_node(struct pglist_data *pgdat); 185extern void __init register_page_bootmem_info_node(struct pglist_data *pgdat);
186#else 186#else
187static inline void register_page_bootmem_info_node(struct pglist_data *pgdat) 187static inline void register_page_bootmem_info_node(struct pglist_data *pgdat)
188{ 188{
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index b8ee0806415f..e3cbdcaff2a5 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -263,7 +263,7 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)
263} 263}
264#endif /* !CONFIG_SPARSEMEM_VMEMMAP */ 264#endif /* !CONFIG_SPARSEMEM_VMEMMAP */
265 265
266void register_page_bootmem_info_node(struct pglist_data *pgdat) 266void __init register_page_bootmem_info_node(struct pglist_data *pgdat)
267{ 267{
268 unsigned long i, pfn, end_pfn, nr_pages; 268 unsigned long i, pfn, end_pfn, nr_pages;
269 int node = pgdat->node_id; 269 int node = pgdat->node_id;