All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>,
	David Hildenbrand <david@redhat.com>,
	Oscar Salvador <osalvador@suse.de>,
	Brendan Jackman <jackmanb@google.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Gregory Price <gourry@gourry.net>,
	Dan Williams <dan.j.williams@intel.com>,
	"Mike Rapoport (Microsoft)" <rppt@kernel.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mm/page_alloc: add dummy in_mem_hotplug() helper
Date: Tue,  4 Mar 2025 15:31:51 +0100	[thread overview]
Message-ID: <20250304143157.856892-1-arnd@kernel.org> (raw)

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



                 reply	other threads:[~2025-03-04 14:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250304143157.856892-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=dan.j.williams@intel.com \
    --cc=david@redhat.com \
    --cc=gourry@gourry.net \
    --cc=jackmanb@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@suse.de \
    --cc=rppt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.