From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [91.218.175.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60B0D2853EE for ; Sun, 5 Jul 2026 17:16:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783271820; cv=none; b=MMGQcJo1czGaA3XpLPGC4t/Ytiu89NVpcu6h0FZgCZHJ4vIpFjBsr/OLVuErKimDzoCVlJaxHmM8EqDgJ6pbxxOo2IsWgR12uKDQYB4quR90hqAseeTNAX9wE1KNv5mIZRrDZ36LnktatS7xtQC0sa2c5HmOjZ34k65AB1eF0wU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783271820; c=relaxed/simple; bh=DqYuAeU7HhsoqF7p2bVgGO6NLnbLPv9H2riWHfR3UjM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=M+uYBB9PngaoqBnG3XMCvthY1JnUDp6+heHVpevuuwMDM/6g4m3T5yTiqtyGzyppb//T1qBw1kWwOg3XDAApgQfTnXxDo8D9AMzv84D0/x7mQdRjk3ik99HECOTTbywKDKyuBXWf38auAHO5pa4Qj0/8XM9jM6jKbDKmXUrv53E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=r0+eBm0n; arc=none smtp.client-ip=91.218.175.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="r0+eBm0n" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1783271816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sByQAelD9kU2hmHmm42Y0mYPGU0m6hNFnEAETqZcxWA=; b=r0+eBm0nHdWwY07dzN7IjGsdZkXuyn3V2fVVaf3pP+2d3WTC9wbQKvL4pahItlO55fwuK5 b8bOLKUvMY2HbWOFtJCyxZcpM+MaVeSj/FWfKUnvEzMvZC/EzDoswa7NvKMYqLg3XsqhOQ 94Ux1QiHpLhHGj+YL80i0o/cSHY+dxY= From: Thorsten Blum To: Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" Cc: Thorsten Blum , 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 Message-ID: <20260705171631.338768-4-thorsten.blum@linux.dev> In-Reply-To: <20260705171631.338768-3-thorsten.blum@linux.dev> References: <20260705171631.338768-3-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2461; i=thorsten.blum@linux.dev; h=from:subject; bh=DqYuAeU7HhsoqF7p2bVgGO6NLnbLPv9H2riWHfR3UjM=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFleE6sN/zXfn2V1V+CM/fUgvrm2MQ/OBjacbsz7lb1H8 ifX2Q0uHaUsDGJcDLJiiiwPZv2Y4VtaU7nJJGInzBxWJpAhDFycAjARpxmMDA8iP2m47Z1p9azp cMWJ05xGT3a36Noe1xLrWRm80Wz13GKGv9Kd6wxFz7gk1Qh1bKo9OFds25N5inzX5r9O2Z9Xnh/ 0jx8A X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 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 --- 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;