mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v5 0/4] x86/boot/compressed: Enable -Wunused and remove unused variables
@ 2026-11-10 11:56 Thorsten Blum
  2026-11-10 11:56 ` [PATCH v5 1/4] x86/boot/compressed: Remove unused variables in EFI helpers Thorsten Blum
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Thorsten Blum @ 2026-11-10 11:56 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Nicolas Schier, Ard Biesheuvel,
	Lorenzo Stoakes (ARM), Jan Stancek, Mike Rapoport (Microsoft),
	Pratyush Yadav (Google),
	Tom Lendacky, Ryan Roberts, Andreas Larsson, Andrew Morton,
	Kevin Brodsky
  Cc: linux-kernel, Thorsten Blum

This series removes unused variables and marks __efi_get_rsdp_addr() as
__maybe_unused. Patch 4 then enables -Wunused, matching the W=0 kernel
defaults. With WERROR=y, the warnings failed as follows:

  arch/x86/boot/compressed/acpi.c:25:1: error: '__efi_get_rsdp_addr' defined but not used
  arch/x86/boot/compressed/acpi.c:29:6: error: unused variable 'ret'
  arch/x86/boot/compressed/acpi.c:57:15: error: unused variable 'nr_tables'
  arch/x86/boot/compressed/efi.c:64:16: error: unused variable 'et'
  arch/x86/boot/compressed/efi.c:136:6: error: unused variable 'ret'
  arch/x86/boot/compressed/kaslr.c:600:13: error: unused variable 'i'

Patch 2 also drops a redundant efi_get_system_table() call and uses the
existing efi_get_conf_table() error path.

Changes in v5:
- Drop unrelated fall-through change from efi_get_system_table() (Ingo)
- Avoid __maybe_unused and declare index in for loop initializer (Ingo)
- v4: https://lore.kernel.org/r/20261109124816.61438-6-blum@kernel.org/

Changes in v4:
- Add a newline to the log message in efi_get_system_table() (Jan)
- Make efi_get_system_table() static and update misc.h (Jan)
- v3: https://lore.kernel.org/r/20261109005528.3477-6-blum@kernel.org/

Changes in v3:
- Rebase patch 4/4
- v2: https://lore.kernel.org/r/20260624120300.590233-6-thorsten.blum@linux.dev/

Changes in v2:
- Fix a kernel test robot issue by marking __efi_get_rsdp_addr() as
  __maybe_unused: https://lore.kernel.org/r/202606240416.cXegPpiJ-lkp@intel.com/
- v1: https://lore.kernel.org/r/20260621144116.224010-6-thorsten.blum@linux.dev/

Thorsten Blum (4):
  x86/boot/compressed: Remove unused variables in EFI helpers
  x86/boot/compressed: Clean up EFI RSDP lookup in efi_get_rsdp_addr()
  x86/boot/compressed: Declare immovable_mem index in loop initializer
  x86/boot/compressed: Enable -Wunused

 arch/x86/boot/compressed/Makefile |  3 +++
 arch/x86/boot/compressed/acpi.c   | 18 ++++--------------
 arch/x86/boot/compressed/efi.c    | 17 ++++++-----------
 arch/x86/boot/compressed/kaslr.c  |  3 +--
 arch/x86/boot/compressed/misc.h   |  6 ------
 5 files changed, 14 insertions(+), 33 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-10 11:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-10 11:56 [PATCH v5 0/4] x86/boot/compressed: Enable -Wunused and remove unused variables Thorsten Blum
2026-11-10 11:56 ` [PATCH v5 1/4] x86/boot/compressed: Remove unused variables in EFI helpers Thorsten Blum
2026-11-10 11:56 ` [PATCH v5 2/4] x86/boot/compressed: Clean up EFI RSDP lookup in efi_get_rsdp_addr() Thorsten Blum
2026-11-10 11:56 ` [PATCH v5 3/4] x86/boot/compressed: Declare immovable_mem index in loop initializer Thorsten Blum
2026-11-10 11:56 ` [PATCH v5 4/4] x86/boot/compressed: Enable -Wunused Thorsten Blum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®