From: Mike Rapoport <rppt@kernel.org>
To: linux-mm@kvack.org
Cc: Mike Rapoport <rppt@kernel.org>, linux-kernel@vger.kernel.org
Subject: [PATCH] memblock test: include <linux/sizes.h> from tools mm.h stub
Date: Sun, 28 Dec 2025 20:39:42 +0200 [thread overview]
Message-ID: <20251228183942.3628918-1-rppt@kernel.org> (raw)
From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
memblock test compilation fails:
memblock.c: In function ‘memblock_validate_numa_coverage’:
memblock.c:784:58: error: ‘SZ_1M’ undeclared (first use in this function)
784 | mem_size_mb = memblock_phys_mem_size() / SZ_1M;
| ^~~~~
The SZ_1M is defined in sizes.h, but it is not included by stub version of
mm.h in tools/include/linux.
Add include of sizes.h to tools/include/linux/mm.h to fix the compilation
of memblock tests.
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
---
tools/include/linux/mm.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/include/linux/mm.h b/tools/include/linux/mm.h
index 677c37e4a18c..028f3faf46e7 100644
--- a/tools/include/linux/mm.h
+++ b/tools/include/linux/mm.h
@@ -4,6 +4,7 @@
#include <linux/align.h>
#include <linux/mmzone.h>
+#include <linux/sizes.h>
#define PAGE_SHIFT 12
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
--
2.51.0
reply other threads:[~2025-12-28 18:39 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=20251228183942.3628918-1-rppt@kernel.org \
--to=rppt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).