[PATCH v2 3/3] mm,memory_hotplug: Remove unneeded declarations

From: Oscar Salvador
Date: Wed Jun 02 2021 - 11:18:59 EST


include/linux/memory_hotplug.h has the following declarations:

extern int zone_grow_free_lists(struct zone *zone, unsigned long new_nr_pages);
extern int zone_grow_waitqueues(struct zone *zone, unsigned long nr_pages);
extern int add_one_highpage(struct page *page, int pfn, int bad_ppro);

These declarations were added by the following commit:

commit 3947be1969a9ce455ec30f60ef51efb10e4323d1
Author: Dave Hansen <haveblue@xxxxxxxxxx>
Date: Sat Oct 29 18:16:54 2005 -0700

[PATCH] memory hotplug: sysfs and add/remove functions

It seems that zone_grow_free_lists() and zone_grow_waitqueues() were
never used, and add_one_highpage() was always declared as static in
arch/i386/mm/init.c and later on in arch/x86/mm/init_32.c, and was
later removed in:

commit 5e7ccf8635c93b493f7d378a57ce300fbe1484e8
Author: Jiang Liu <liuj97@xxxxxxxxx>
Date: Mon Apr 29 15:07:12 2013 -0700

mm/x86: use free_highmem_page() to free highmem pages into buddy system

So remove these declarations.

Signed-off-by: Oscar Salvador <osalvador@xxxxxxx>
---
include/linux/memory_hotplug.h | 3 ---
1 file changed, 3 deletions(-)

diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 0d837ce6ec11..9a19e97d4f1a 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -80,9 +80,6 @@ struct range mhp_get_pluggable_range(bool need_mapping);
/*
* Zone resizing functions
*/
-extern int zone_grow_free_lists(struct zone *zone, unsigned long new_nr_pages);
-extern int zone_grow_waitqueues(struct zone *zone, unsigned long nr_pages);
-extern int add_one_highpage(struct page *page, int pfn, int bad_ppro);
extern void adjust_present_page_count(struct zone *zone, long nr_pages);
/* VM interface that may be used by firmware interface */
extern int mhp_init_memmap_on_memory(unsigned long pfn, unsigned long nr_pages,
--
2.16.3