From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (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 13AF5370AC9 for ; Sun, 21 Jun 2026 14:42:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782052940; cv=none; b=Ffp27HQrUH+JJnXPyD5m5za4NE6Z/NBVoqiQASOGDqSiASSGnkccN3TO5aXnTin1qM7Ndze3QpOWCRHprlCMQAJQai5isWNi5ByVJpOJoJPbFeJ0OXVHzWRKgrwReYc1blQVKSHm8sw303iO+C86PXWnHfRA9A703ZJ/C9bCaAI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782052940; c=relaxed/simple; bh=l6negj0Lv6186RJRPTqpDbyssK6nT6bhlyT+aVg5vQo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Zm8UdilwLMupuhXfkaWTxtKvKGLmh7KDOtTPDinRijM+VzCXrAxuEebGxJ080APLI6NT9nR9eOzlnGbRQr2q2Hb47j5QKNWtFv8T+9dFMH6tQo59IHO5Qo/hhaWjwS/LDOLh1U7bO3Di9Nt/jUz/kQ37FoKRUZLY4Os6SKWGLz4= 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=meysQKvq; arc=none smtp.client-ip=91.218.175.182 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="meysQKvq" 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=1782052937; 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=meysQKvqpfBw7fUukPbQfSRxwqtzYpqe4BkAqT9asETN1cPEwMhOtSGefq02ZG5b4a5SyY JakOXpryd4/+7Woq8mNytdu1iIDRhVQwGfpbPMkpUa+SCMapon67R5zrzGXlUO684NthN8 oiifR4WXM7OJyqFZfJkX/06A+CuYH1A= 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 4/4] x86/boot/compressed: Enable -Wunused Date: Sun, 21 Jun 2026 16:41:21 +0200 Message-ID: <20260621144116.224010-10-thorsten.blum@linux.dev> In-Reply-To: <20260621144116.224010-6-thorsten.blum@linux.dev> References: <20260621144116.224010-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=owGbwMvMwCUWt7pQ4caZUj3G02pJDFnmP3g1C4OU3iyo3DVTocsgbcaaHrkbATt2P7xVvnRZQ 9zZupMzO0pZGMS4GGTFFFkezPoxw7e0pnKTScROmDmsTCBDGLg4BWAi/7wY/sqtiVw/P3DX/ZTn seoKykunG1X9WTyzoq93ZZ5N5D/uQ08Z/lcoRRrM1uG83bL0wZdLu0PipA773NwyrW29/YpvFsH ualwA 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