Thread (24 messages) flat view 24 messages, 7 authors, 2023-06-22
STALE1192d

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

From: Arnd Bergmann <arnd@kernel.org>
Date: 2023-05-17 13:12:16
Also in: linux-arm-kernel, linux-kselftest, linux-mips, linux-mm, linux-pm, linux-riscv, linux-s390, linux-sh, lkml
Subsystem: memory management, memory management - core, the rest · Maintainers: Andrew Morton, David Hildenbrand, Linus Torvalds

From: Arnd Bergmann <arnd@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@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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help