From: Thorsten Blum <thorsten.blum@linux.dev>
To: Dave Hansen <dave.hansen@linux.intel.com>,
Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Cc: Thorsten Blum <thorsten.blum@linux.dev>, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] x86/mm/numa: Update format specifiers in amd_numa_init()
Date: Sun, 5 Jul 2026 19:16:32 +0200 [thread overview]
Message-ID: <20260705171631.338768-4-thorsten.blum@linux.dev> (raw)
In-Reply-To: <20260705171631.338768-3-thorsten.blum@linux.dev>
Use %u instead of %d as format specifiers when printing numnodes and
nodeid values, which are both unsigned integers.
Use %llx instead of %Lx for the u64 base and limit values.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
arch/x86/mm/amdtopology.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/arch/x86/mm/amdtopology.c b/arch/x86/mm/amdtopology.c
index d68d345a5b82..a41dc0e29596 100644
--- a/arch/x86/mm/amdtopology.c
+++ b/arch/x86/mm/amdtopology.c
@@ -73,7 +73,7 @@ int __init amd_numa_init(void)
if (numnodes <= 1)
return -ENOENT;
- pr_info("Number of physical nodes %d\n", numnodes);
+ pr_info("Number of physical nodes %u\n", numnodes);
prevbase = 0;
for (i = 0; i < 8; i++) {
@@ -89,24 +89,23 @@ int __init amd_numa_init(void)
continue;
}
if (nodeid >= numnodes) {
- pr_info("Ignoring excess node %d (%Lx:%Lx)\n", nodeid,
+ pr_info("Ignoring excess node %u (%llx:%llx)\n", nodeid,
base, limit);
continue;
}
if (!limit) {
- pr_info("Skipping node entry %d (base %Lx)\n",
+ pr_info("Skipping node entry %d (base %llx)\n",
i, base);
continue;
}
if ((base >> 8) & 3 || (limit >> 8) & 3) {
- pr_err("Node %d using interleaving mode %Lx/%Lx\n",
+ pr_err("Node %u using interleaving mode %llx/%llx\n",
nodeid, (base >> 8) & 3, (limit >> 8) & 3);
return -EINVAL;
}
if (node_isset(nodeid, numa_nodes_parsed)) {
- pr_info("Node %d already present, skipping\n",
- nodeid);
+ pr_info("Node %u already present, skipping\n", nodeid);
continue;
}
@@ -120,23 +119,23 @@ int __init amd_numa_init(void)
base >>= 16;
base <<= 24;
if (limit == base) {
- pr_err("Empty node %d\n", nodeid);
+ pr_err("Empty node %u\n", nodeid);
continue;
}
if (limit < base) {
- pr_err("Node %d bogus settings %Lx-%Lx.\n",
+ pr_err("Node %u bogus settings %llx-%llx.\n",
nodeid, base, limit);
continue;
}
/* Could sort here, but pun for now. Should not happen anyroads. */
if (prevbase > base) {
- pr_err("Node map not sorted %Lx,%Lx\n",
+ pr_err("Node map not sorted %llx,%llx\n",
prevbase, base);
return -EINVAL;
}
- pr_info("Node %d MemBase %016Lx Limit %016Lx\n",
+ pr_info("Node %u MemBase %016llx Limit %016llx\n",
nodeid, base, limit);
prevbase = base;
prev parent reply other threads:[~2026-07-05 17:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-05 17:16 [PATCH 1/2] x86/mm/numa: Clean up topology parsing in amd_numa_init() Thorsten Blum
2026-07-05 17:16 ` Thorsten Blum [this message]
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=20260705171631.338768-4-thorsten.blum@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@kernel.org \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox