From: Heiko Carstens Date: Mon, 16 Oct 2023 10:17:59 +0000 (+0200) Subject: s390/mm: make vmemmap_free() only for CONFIG_MEMORY_HOTPLUG available X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4f62c6e30155c7a85ed74e52bb8c71e7b0879cb3;p=users%2Fjedix%2Flinux-maple.git s390/mm: make vmemmap_free() only for CONFIG_MEMORY_HOTPLUG available Get rid of this W=1 compile warning: arch/s390/mm/vmem.c:502:6: warning: no previous prototype for ‘vmemmap_free’ [-Wmissing-prototypes] 502 | void vmemmap_free(unsigned long start, unsigned long end, | ^~~~~~~~~~~~ Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik --- diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c index 5ed2e9254649..86384586eb20 100644 --- a/arch/s390/mm/vmem.c +++ b/arch/s390/mm/vmem.c @@ -499,6 +499,8 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node, return ret; } +#ifdef CONFIG_MEMORY_HOTPLUG + void vmemmap_free(unsigned long start, unsigned long end, struct vmem_altmap *altmap) { @@ -507,6 +509,8 @@ void vmemmap_free(unsigned long start, unsigned long end, mutex_unlock(&vmem_mutex); } +#endif + void vmem_remove_mapping(unsigned long start, unsigned long size) { mutex_lock(&vmem_mutex);