[PATCH 03/14] mm: sparse: mark populate_section_memmap() static

Arnd Bergmann arnd at kernel.org
Wed May 17 06:10:51 PDT 2023


From: Arnd Bergmann <arnd at arndb.de>

There are two definitions of this function, but the second one
lacks the 'static' annotation:

mm/sparse.c:704:25: error: no previous prototype for 'populate_section_memmap' [-Werror=missing-prototypes]

Signed-off-by: Arnd Bergmann <arnd at arndb.de>
---
 mm/sparse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/sparse.c b/mm/sparse.c
index c2afdb26039e..b8d5d58fe240 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -701,7 +701,7 @@ static int fill_subsection_map(unsigned long pfn, unsigned long nr_pages)
 	return rc;
 }
 #else
-struct page * __meminit populate_section_memmap(unsigned long pfn,
+static struct page * __meminit populate_section_memmap(unsigned long pfn,
 		unsigned long nr_pages, int nid, struct vmem_altmap *altmap,
 		struct dev_pagemap *pgmap)
 {
-- 
2.39.2




More information about the linux-arm-kernel mailing list