Skip to contentSkip to conversation

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

PATCH Applied Mike Rapoport 1 participant 1 message Jul 16, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

From: Mike Rapoport <[email protected]>

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.

---
 mm/page_alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/page_alloc.c +2 -2
index b82e55006894..246a4f40ec41 100644
@@ -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
Signature · 1 line
2.28.0