All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thorsten Blum <blum@kernel.org>
To: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Nicolas Schier <n.schier@fritz.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	"Lorenzo Stoakes (ARM)" <ljs@kernel.org>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Jan Stancek <jstancek@redhat.com>,
	"Pratyush Yadav (Google)" <pratyush@kernel.org>,
	"Mike Rapoport (Microsoft)" <rppt@kernel.org>,
	Thorsten Blum <blum@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH v3 3/4] x86/boot/compressed: Mark process_mem_region() index __maybe_unused
Date: Mon,  9 Nov 2026 01:55:31 +0100	[thread overview]
Message-ID: <20261109005528.3477-9-blum@kernel.org> (raw)
In-Reply-To: <20261109005528.3477-6-blum@kernel.org>

The local index variable i in process_mem_region() is unused when either
CONFIG_MEMORY_HOTREMOVE or CONFIG_ACPI is disabled.

Mark it __maybe_unused accordingly.

Signed-off-by: Thorsten Blum <blum@kernel.org>
---
 arch/x86/boot/compressed/kaslr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
index 290153818d0f..6f95092fa97e 100644
--- a/arch/x86/boot/compressed/kaslr.c
+++ b/arch/x86/boot/compressed/kaslr.c
@@ -599,7 +599,8 @@ static bool process_mem_region(struct mem_vector *region,
 			       unsigned long minimum,
 			       unsigned long image_size)
 {
-	int i;
+	int i __maybe_unused;
+
 	/*
 	 * If no immovable memory found, or MEMORY_HOTREMOVE disabled,
 	 * use @region directly.

  parent reply	other threads:[~2026-11-09  0:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09  0:55 [PATCH v3 0/4] x86/boot/compressed: Enable -Wunused and remove unused variables Thorsten Blum
2026-11-09  0:55 ` [PATCH v3 1/4] x86/boot/compressed: Remove unused variables in EFI helpers Thorsten Blum
2026-11-09  0:55 ` [PATCH v3 2/4] x86/boot/compressed: Clean up EFI RSDP lookup in efi_get_rsdp_addr() Thorsten Blum
2026-11-09  0:55 ` Thorsten Blum [this message]
2026-11-09  0:55 ` [PATCH v3 4/4] x86/boot/compressed: Enable -Wunused Thorsten Blum
2026-11-09  7:14 ` [PATCH v3 0/4] x86/boot/compressed: Enable -Wunused and remove unused variables Nicolas Schier
2026-11-09  7:55 ` Jan Stancek

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=20261109005528.3477-9-blum@kernel.org \
    --to=blum@kernel.org \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jstancek@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ljs@kernel.org \
    --cc=mingo@redhat.com \
    --cc=n.schier@fritz.com \
    --cc=pratyush@kernel.org \
    --cc=rppt@kernel.org \
    --cc=tglx@kernel.org \
    --cc=vkuznets@redhat.com \
    --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 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.