[PATCH] x86/mm/32: Fix -Wmissing prototypes warnings in init.c
From: Benjamin Thiel
Date: Sat Jun 06 2020 - 08:46:32 EST
Fix:
arch/x86/mm/init.c:503:21:
warning: no previous prototype for âinit_memory_mappingâ [-Wmissing-prototypes]
unsigned long __ref init_memory_mapping(unsigned long start,
arch/x86/mm/init.c:745:13:
warning: no previous prototype for âpoking_initâ [-Wmissing-prototypes]
void __init poking_init(void)
Lift init_memory_mapping() and poking_init() out of the ifdef CONFIG_X86_64 to
make the functions visible on 32-bit too.
Signed-off-by: Benjamin Thiel <b.thiel@xxxxxxxxx>
---
arch/x86/include/asm/pgtable.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index f51d8997ed00..741029e867f8 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -1069,6 +1069,9 @@ extern int direct_gbpages;
void init_mem_mapping(void);
void early_alloc_pgt_buf(void);
extern void memblock_find_dma_reserve(void);
+void __init poking_init(void);
+unsigned long init_memory_mapping(unsigned long start,
+ unsigned long end, pgprot_t prot);
#ifdef CONFIG_X86_64
/* Realmode trampoline initialization. */
@@ -1079,10 +1082,6 @@ static inline void __meminit init_trampoline_default(void)
trampoline_pgd_entry = init_top_pgt[pgd_index(__PAGE_OFFSET)];
}
-void __init poking_init(void);
-
-unsigned long init_memory_mapping(unsigned long start,
- unsigned long end, pgprot_t prot);
# ifdef CONFIG_RANDOMIZE_MEMORY
void __meminit init_trampoline(void);
--
2.20.1