diff mbox series

mm/page_alloc: make alloc_node_mem_map() __init rather than __ref

Message ID 20210716064124.31865-1-rppt@kernel.org (mailing list archive)
State New
Headers show
Series mm/page_alloc: make alloc_node_mem_map() __init rather than __ref | expand

Commit Message

Mike Rapoport July 16, 2021, 6:41 a.m. UTC
From: Mike Rapoport <rppt@linux.ibm.com>

alloc_node_mem_map() is never only called from free_area_init_node() that
is an __init function.

Make the actual alloc_node_mem_map() also __init and its stub version
static inline.

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---
 mm/page_alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b82e55006894..246a4f40ec41 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -7497,7 +7497,7 @@  static void __init free_area_init_core(struct pglist_data *pgdat)
 }
 
 #ifdef CONFIG_FLATMEM
-static void __ref alloc_node_mem_map(struct pglist_data *pgdat)
+static void __init alloc_node_mem_map(struct pglist_data *pgdat)
 {
 	unsigned long __maybe_unused start = 0;
 	unsigned long __maybe_unused offset = 0;
@@ -7543,7 +7543,7 @@  static void __ref alloc_node_mem_map(struct pglist_data *pgdat)
 #endif
 }
 #else
-static void __ref alloc_node_mem_map(struct pglist_data *pgdat) { }
+static inline void alloc_node_mem_map(struct pglist_data *pgdat) { }
 #endif /* CONFIG_FLATMEM */
 
 #ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT