linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/page_alloc: add dummy in_mem_hotplug() helper
@ 2025-03-04 14:31 Arnd Bergmann
  0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2025-03-04 14:31 UTC (permalink / raw)
  To: Andrew Morton, David Hildenbrand, Oscar Salvador, Brendan Jackman
  Cc: Arnd Bergmann, Gregory Price, Dan Williams,
	Mike Rapoport (Microsoft),
	linux-mm, linux-kernel

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 --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)
 {
-- 
2.39.5



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-03-04 14:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-04 14:31 [PATCH] mm/page_alloc: add dummy in_mem_hotplug() helper Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox