From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-178.mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178]) (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 3CB93370AFB for ; Wed, 24 Jun 2026 12:03:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782302616; cv=none; b=koGWFYSAVKKXSvQ/nWF0k7NtwiEECTtxBAqslggnYni1KnrpBZjMpi24V8Aylb+5672oQTzasB7/Mrwtj5o3snUmz5iRxrkhcjeV3uZ7U7MP77A0ofKCPzpxZ/IwtB4cjLyzIiCPobCqVXUWRjFHqhfQ7yIOd7GtqvV/ktJ67js= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782302616; c=relaxed/simple; bh=l6negj0Lv6186RJRPTqpDbyssK6nT6bhlyT+aVg5vQo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ltfxfn0y3Lyt9cJJIQM9npR3jsqDVThSVeLUa3qbN36E5F4zox7GMyoR8DQcoJdu4byqy3CHQkNwz7UdblICyh8ecWZfRQZ9HwxPWIgsqXzYl/vO4KecWrGuJ3x2wJQIkUTRpC7jAQwRaDixtFTmzl5nVrpBEYf+fHujFvOyFIQ= 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=ATVMtm2E; arc=none smtp.client-ip=91.218.175.178 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="ATVMtm2E" 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=1782302613; 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=l6negj0Lv6186RJRPTqpDbyssK6nT6bhlyT+aVg5vQo=; b=ATVMtm2E9T/tsfabpYnz70GzL9mfWE1agj1sutpJ9WZKAu6k+DfVeHK0RANnHTxS8ktdp0 Aqh+MftVLPKtIikSdWoy5/8vqTZXKzMjWAogVrfpeHGP9RSeJKoyN//8m1w8neAWoSYPkA /GJOYm3TFfKJcGjI1SlJTCVoSuFyLSQ= 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 4/4] x86/boot/compressed: Enable -Wunused Date: Wed, 24 Jun 2026 14:02:58 +0200 Message-ID: <20260624120300.590233-10-thorsten.blum@linux.dev> In-Reply-To: <20260624120300.590233-6-thorsten.blum@linux.dev> References: <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=1155; i=thorsten.blum@linux.dev; h=from:subject; bh=l6negj0Lv6186RJRPTqpDbyssK6nT6bhlyT+aVg5vQo=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFnWx+s0C4OU3iyo3DVTocsgbcaaHrkbATt2P7xVvnRZQ 9zZupMzO0pZGMS4GGTFFFkezPoxw7e0pnKTScROmDmsTCBDGLg4BWAiLZcZ/plzSvsf4nOb/dGq 63jWlldGx9YrzTP+mxC8zFWp78fhlfMY/lewWlS9Z87aVnmk6pjCWu25ln0Bjhv/tx0TjcpesFK pgQUA X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT arch/x86/boot/compressed/Makefile resets the CFLAGS for this directory, but does not re-enable -Wunused. Therefore, unused variables and static functions in arch/x86/boot/compressed/ currently do not emit warnings. Add -Wunused to warn about these, and -Wno-unused-but-set-variable as well as -Wno-unused-const-variable to match the W=0 kernel defaults. Signed-off-by: Thorsten Blum --- arch/x86/boot/compressed/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index 07e0e64b9a98..c1315a7b712c 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -28,6 +28,9 @@ KBUILD_CFLAGS := -m$(BITS) -O2 $(CLANG_FLAGS) KBUILD_CFLAGS += $(CC_FLAGS_DIALECT) KBUILD_CFLAGS += -fno-strict-aliasing -fPIE KBUILD_CFLAGS += -Wundef +KBUILD_CFLAGS += -Wunused +KBUILD_CFLAGS += -Wno-unused-but-set-variable +KBUILD_CFLAGS += -Wno-unused-const-variable KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING cflags-$(CONFIG_X86_32) := -march=i386 cflags-$(CONFIG_X86_64) := -mcmodel=small -mno-red-zone