Skip to content

Commit 7ded384

Browse files
committed
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 f65e91d ("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 <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent af7d937 commit 7ded384

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/linux/memory_hotplug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
182182
#endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */
183183

184184
#ifdef CONFIG_HAVE_BOOTMEM_INFO_NODE
185-
extern void register_page_bootmem_info_node(struct pglist_data *pgdat);
185+
extern void __init register_page_bootmem_info_node(struct pglist_data *pgdat);
186186
#else
187187
static inline void register_page_bootmem_info_node(struct pglist_data *pgdat)
188188
{

mm/memory_hotplug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)
263263
}
264264
#endif /* !CONFIG_SPARSEMEM_VMEMMAP */
265265

266-
void register_page_bootmem_info_node(struct pglist_data *pgdat)
266+
void __init register_page_bootmem_info_node(struct pglist_data *pgdat)
267267
{
268268
unsigned long i, pfn, end_pfn, nr_pages;
269269
int node = pgdat->node_id;

0 commit comments

Comments
 (0)