diff mbox series

mm/page_alloc: add dummy in_mem_hotplug() helper

Message ID 20250304143157.856892-1-arnd@kernel.org (mailing list archive)
State New
Headers show
Series mm/page_alloc: add dummy in_mem_hotplug() helper | expand

Commit Message

Arnd Bergmann March 4, 2025, 2:31 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

The in_mem_hotplug() prototype was only added to the CONFIG_MEMORY_HOTPLUG
case but is missing from the alternative:

mm/page_alloc.c: In function 'set_pageblock_migratetype':
/home/arnd/arm-soc/mm/page_alloc.c:424:17: error: implicit declaration of function 'in_mem_hotplug' [-Wimplicit-function-declaration]
  424 |                 in_mem_hotplug() ||
      |                 ^~~~~~~~~~~~~~

Add an empty stub like we have for similar functions.

Fixes: b4cfcc26f507 ("mm/page_alloc: add lockdep assertion for pageblock type change")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/linux/memory_hotplug.h | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index ff9511d9b9e6..508a1d074527 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -224,6 +224,10 @@  static inline void put_online_mems(void) {}
 
 static inline void mem_hotplug_begin(void) {}
 static inline void mem_hotplug_done(void) {}
+static inline bool in_mem_hotplug(void)
+{
+	return false;
+}
 
 static inline bool movable_node_is_enabled(void)
 {