From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 3306A40D577 for ; Tue, 30 Jun 2026 08:31:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782808287; cv=none; b=LmImzbIVDsWYuWa4iZpDacEyj+IipoqDOHN0g6yKkVNgF4zlO1XhNWTVdJsepnmLVgWVPud9qf+mZp8BQX4L4zPan6qiCvgh91OTOSlCE31ErUpiw3z4qFJtgK7D+HoVhd0uiCYgKQDod3vt8ztOVUwwhchlz9hO7AYN0BfAzWI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782808287; c=relaxed/simple; bh=RBg3tZPWQcGpBcEAH2KRxWZ2xqKLRC+SnbLylZjsXrs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DsYy8+Bqr4oeoV37NnoJ6T9vVzEYuT/sqE4Df1R0cUjkB+fE3J1jX1SG88pnJZneJDiNaCOlmZKV4YZI8+MHTGNc+Kqa+75p6rczFs3rKPTCXm+T5BXI/4rfY9O1iEi8brjdiZ351DZyupE87N+qpDZhx3ih4pJygr6E5I57hUA= 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=mhjQV3p8; arc=none smtp.client-ip=91.218.175.186 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="mhjQV3p8" 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=1782808282; 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; bh=yGG2z2r7bbGfxI05xeQm2StoIkKuLar+Jr3CFuocvPA=; b=mhjQV3p8/TmNLTTDUBOkto4jzPLiOZRGSsjjhZu+8bGrPUtRGaSO6g/D9g6ywL53SDpqmx wdxgsqmraOSO1XSHXKkPsYn6cjF3o0FffAMt3OLnylgpj9yms2iVyiHjNougDngJgsxGRk /KzevTjp+z84XGAZbXuCclGgzqYGhms= From: Thorsten Blum To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Sohil Mehta , Sean Christopherson , Peter Zijlstra , Pawan Gupta , Nikunj A Dadhania , "Chang S. Bae" , "Ahmed S. Darwish" , Wei Wang , Tony Luck Cc: Thorsten Blum , Ingo Molnar , linux-kernel@vger.kernel.org Subject: [PATCH] x86/cpu: Remove unnecessary __maybe_unused annotations Date: Tue, 30 Jun 2026 10:30:30 +0200 Message-ID: <20260630083031.683508-2-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=1908; i=thorsten.blum@linux.dev; h=from:subject; bh=RBg3tZPWQcGpBcEAH2KRxWZ2xqKLRC+SnbLylZjsXrs=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFnOdcszWC9dT3Wsd14zJcTi45Y1F68msnNc3h6l83PT5 iU1vRLJHaUsDGJcDLJiiiwPZv2Y4VtaU7nJJGInzBxWJpAhDFycAjCRZRqMDPPnNIc1t5lx/3/5 tMXicDHzhlwNPsvdD49WG4Yx8T7d6sTwT/l+eXjK2lnyadOYps3gV9q1evZNhhRL5xYJ4fdHNll z8wMA X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Remove __maybe_unused from variables and functions that are referenced unconditionally. Signed-off-by: Thorsten Blum --- arch/x86/kernel/cpu/common.c | 2 +- arch/x86/kernel/cpu/microcode/amd.c | 3 +-- arch/x86/kernel/cpu/topology_common.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index a3df21d26460..63cab0554bc6 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1651,7 +1651,7 @@ static inline bool parse_set_clear_cpuid(char *arg, bool set) int taint = 0; while (arg) { - bool found __maybe_unused = false; + bool found = false; unsigned int bit; opt = strsep(&arg, ","); diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c index 531dfb771c8b..6cdc410e7547 100644 --- a/arch/x86/kernel/cpu/microcode/amd.c +++ b/arch/x86/kernel/cpu/microcode/amd.c @@ -136,8 +136,7 @@ struct cont_desc { * Microcode patch container file is prepended to the initrd in cpio * format. See Documentation/arch/x86/microcode.rst */ -static const char -ucode_path[] __maybe_unused = "kernel/x86/microcode/AuthenticAMD.bin"; +static const char ucode_path[] = "kernel/x86/microcode/AuthenticAMD.bin"; /* * This is CPUID(1).EAX on the BSP. It is used in two ways: diff --git a/arch/x86/kernel/cpu/topology_common.c b/arch/x86/kernel/cpu/topology_common.c index cf7513416b70..f0b0a91fcf0f 100644 --- a/arch/x86/kernel/cpu/topology_common.c +++ b/arch/x86/kernel/cpu/topology_common.c @@ -62,7 +62,7 @@ const char *get_topology_cpu_type_name(struct cpuinfo_x86 *c) } } -static unsigned int __maybe_unused parse_num_cores_legacy(struct cpuinfo_x86 *c) +static unsigned int parse_num_cores_legacy(struct cpuinfo_x86 *c) { struct { u32 cache_type : 5,