[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210716064124.31865-1-rppt@kernel.org>
Date: Fri, 16 Jul 2021 09:41:24 +0300
From: Mike Rapoport <rppt@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Mike Rapoport <rppt@...nel.org>,
Mike Rapoport <rppt@...ux.ibm.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] mm/page_alloc: make alloc_node_mem_map() __init rather than __ref
From: Mike Rapoport <rppt@...ux.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@...ux.ibm.com>
---
mm/page_alloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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
--
2.28.0
Powered by blists - more mailing lists