From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-172.mta0.migadu.com (out-172.mta0.migadu.com [91.218.175.172]) (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 C2FCC22CBE6 for ; Wed, 24 Jun 2026 12:03:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782302614; cv=none; b=GMpATfNorZbRZLSyrltUqaoDtm8JeWdD88nk0ZkZzENMg//8sgpD08UXnNxitnuzXLXl55+FyTwWtbqkOREfc1GTE/WHuyJVX/Jxq+e8Jih1SimCL0GX2bHXLNWBnyXbLjUEtwTNjQCVWZWp2C4NN/eqWdGfEnEVBp4992hhSpk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782302614; c=relaxed/simple; bh=l38wdCeJax6Km+iKMG9vYjY+by+92plZiyPnS7IRp+0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=r1WQag49k3qmf0qjmHuNZgZaAFgmtxMI/ghQ/cwb0qkTwHQy//GDG5xqptGctTWgq0SCM2+wM9b7/M0pH1HPNX3AZLG2WK2GqK83yplPijp5q9rgQh8wyXVHUgCszb2dJcybKBTV7Pgs8ZyOf2hF6rQ5yxGgHbLtRl3T4wr/vyI= 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=EQbzcKRS; arc=none smtp.client-ip=91.218.175.172 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="EQbzcKRS" 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=1782302608; h=from:from: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; bh=i29YQeIuDWKPzCBbtHicDd25IgfqwkwBHSn9GHgB61k=; b=EQbzcKRSqfRP91gfxADdt6BHTkCgqQLdtAgz9+1J5x2MIn/I3nZEMijrAB5MX3/2KX/zeR 3lQc5HfcfrIMvhQc6u7xer+YuQibnK7DbvaC3IF/uy0qY5Ey5Bv9Icm+RcX6o8hxGcPadU 8EwopJsxYGi/W21YLblzXI1mss1n06Y= From: Thorsten Blum To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Ard Biesheuvel , Nathan Chancellor , Nicolas Schier Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Thorsten Blum Subject: [PATCH v2 0/4] x86/boot/compressed: Enable -Wunused and remove unused variables Date: Wed, 24 Jun 2026 14:02:54 +0200 Message-ID: <20260624120300.590233-6-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=1639; i=thorsten.blum@linux.dev; h=from:subject; bh=l38wdCeJax6Km+iKMG9vYjY+by+92plZiyPnS7IRp+0=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFnWx0vefjHVWMD6zT5f8MTt3yxcLjK7bH5+sQ/rz/tl1 PX5ssvFjlIWBjEuBlkxRZYHs37M8C2tqdxkErETZg4rE8gQBi5OAZjIfUuGv9LLt9wXfhbofLDJ uULq2uJsncsPlp2Zrlb9xd7hV/fZdbkM/yvuzk9Nuxa6XyAkRFEncun8Cfx7/ace8/YKP1PZEbg 7hx0A X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT This series marks potentially unused variables and functions as __maybe_unused and removes truly unused ones. Patch 4 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 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: Mark process_mem_region() index __maybe_unused 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 ++- 4 files changed, 14 insertions(+), 27 deletions(-) base-commit: 840ef6c78e6a2f694b578ecb9063241c992aaa9e