mm: fix section mismatch warning
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 27 May 2016 22:23:32 +0000 (15:23 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 27 May 2016 22:23:32 +0000 (15:23 -0700)
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>
include/linux/memory_hotplug.h
mm/memory_hotplug.c

index 20d8a5d4d133e3ca557b70ea89fb602d50f96e71..5145620ba48a9572a94315b91265c5e657b78e17 100644 (file)
@@ -182,7 +182,7 @@ static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
 #endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */
 
 #ifdef CONFIG_HAVE_BOOTMEM_INFO_NODE
-extern void register_page_bootmem_info_node(struct pglist_data *pgdat);
+extern void __init register_page_bootmem_info_node(struct pglist_data *pgdat);
 #else
 static inline void register_page_bootmem_info_node(struct pglist_data *pgdat)
 {
index b8ee0806415f18c650cb8fa130d5102894e3a849..e3cbdcaff2a59a5196c045b68229d35780d63301 100644 (file)
@@ -263,7 +263,7 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)
 }
 #endif /* !CONFIG_SPARSEMEM_VMEMMAP */
 
-void register_page_bootmem_info_node(struct pglist_data *pgdat)
+void __init register_page_bootmem_info_node(struct pglist_data *pgdat)
 {
        unsigned long i, pfn, end_pfn, nr_pages;
        int node = pgdat->node_id;