From nobody Sun Feb 8 07:59:51 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 EAF8D2C11EB; Sun, 14 Dec 2025 08:37:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765701459; cv=none; b=rZkISD88wuRSzI7F6hMVKg1zC46jSyyZUCsLXBhSn+Zk0CRaeEV/mkW2THu10jeNQbA+U8vOOs/fC7XKp+tBNTEGgX/nMXkBfoOw7fXKzHb5eiLsEKQBY9SfRl+sQGQb+WOwhtD0mxEGHoRtD0nof5uJ6PszJUlFpc2ILFRItwA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765701459; c=relaxed/simple; bh=IaR4iRcbbpaqkpAjHhTteDzeiClb4vItA5KSaN8WhCc=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=drsMbNtn+ZilZLdl/QcsI384KRDJq3ISVLrmiccWhMcFWBNbwqzL7EjVAnXWks9nsQS4WwIRFx57ZhC2ZmjyzWdPVWon6AMsAQ7rZv6j5nMB1rRbK6IuD8fTWm3jOIsgMGUq/PHYD9AGHzKQhZir/1kovsaPSpBMaydbzklwOBQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=MhMQR0IM; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=e5uHlYjq; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="MhMQR0IM"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="e5uHlYjq" Date: Sun, 14 Dec 2025 08:37:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1765701456; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uys477tbVbW38gDVBbtzr4ZCkyHUYFKYYwj4lGBg7CU=; b=MhMQR0IMf6H4pEChXV2dWkaGimMFKXekkZP2go/uBXCCcN5v1BoYJpUPonkl/b7gU1AAy8 qFF2V4bWLa6QbBIKva2FLwptgwcQ+dbHMF4JaoAOnqAqy0qOavTBQihsq6d/I2qJXtAKEo 3i1nO+8cACvP81W6A9wXESv7RTe2xw7nZTruERp11QUiI7dF+LlYSewpyTNyDN0P7j4svN 9BBoDdR/XGSHliFB/oHL46rP7Hdt2GY7z8lLJEz+Y2tdZuKHNBVGY4d6FMfh7056UGzitl B6TFp1GoiDhRp+Sr4ximiJGopyaTbW//2LFPgHsW1rnWftCC65e7R7qfmgAGTQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1765701456; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uys477tbVbW38gDVBbtzr4ZCkyHUYFKYYwj4lGBg7CU=; b=e5uHlYjq6Uu/Yb/792TAvLT6TZBymLaIWs5O/jA7sasDb7Zlg7UvUWTMUtK+LaB3c9BsUw thfws2TdeNPLQOBg== From: "tip-bot2 for Ingo Molnar" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/boot] x86/boot/e820: Clean up __e820__range_add() a bit Cc: Ingo Molnar , Andy Shevchenko , Arnd Bergmann , Borislav Petkov , Juergen Gross , "H . Peter Anvin" , Kees Cook , Linus Torvalds , Mike Rapoport , Paul Menzel , Peter Zijlstra , Thomas Gleixner , David Woodhouse , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20250515120549.2820541-15-mingo@kernel.org> References: <20250515120549.2820541-15-mingo@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <176570145525.498.17211876197299706287.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/boot branch of tip: Commit-ID: a4803df3a2b145fd17bc3d4c23c4c12c74951299 Gitweb: https://git.kernel.org/tip/a4803df3a2b145fd17bc3d4c23c4c12c7= 4951299 Author: Ingo Molnar AuthorDate: Thu, 15 May 2025 14:05:30 +02:00 Committer: Ingo Molnar CommitterDate: Sun, 14 Dec 2025 09:19:39 +01:00 x86/boot/e820: Clean up __e820__range_add() a bit - Use 'idx' index variable instead of a weird 'x' - Make the error message E820-specific - Group the code a bit better Signed-off-by: Ingo Molnar Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Kees Cook Cc: Linus Torvalds Cc: Mike Rapoport Cc: Paul Menzel Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: David Woodhouse Link: https://patch.msgid.link/20250515120549.2820541-15-mingo@kernel.org --- arch/x86/kernel/e820.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 0c3f12f..4340751 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -166,17 +166,18 @@ int e820__get_entry_type(u64 start, u64 end) */ static void __init __e820__range_add(struct e820_table *table, u64 start, = u64 size, enum e820_type type) { - int x =3D table->nr_entries; + int idx =3D table->nr_entries; =20 - if (x >=3D ARRAY_SIZE(table->entries)) { - pr_err("too many entries; ignoring [mem %#010llx-%#010llx]\n", - start, start + size - 1); + if (idx >=3D ARRAY_SIZE(table->entries)) { + pr_err("too many E820 table entries; ignoring [mem %#010llx-%#010llx]\n", + start, start + size-1); return; } =20 - table->entries[x].addr =3D start; - table->entries[x].size =3D size; - table->entries[x].type =3D type; + table->entries[idx].addr =3D start; + table->entries[idx].size =3D size; + table->entries[idx].type =3D type; + table->nr_entries++; } =20