From nobody Sun Feb 8 02:56:24 2026 Received: from imap5.colo.codethink.co.uk (imap5.colo.codethink.co.uk [78.40.148.171]) (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 DB1A9306B37 for ; Wed, 7 Jan 2026 10:06:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.40.148.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767780372; cv=none; b=Dwxnjma9LoLpTJSI44odonpJFlPuup3lKY51kg7A0k97km2hoWqF99DlGe09VrZ1eRj7E+qA9aftibOMexqcMtVPkqzfXi/TVAqdjHj7jDqVbuP9Um0W0IoLbuQ9hHTU8DWRr8g6HPZ8vHODOKu0RaGoDFLzQF8TwJz7Fzhbzdc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767780372; c=relaxed/simple; bh=F5oyHze75ySo0bs/YHXvngvm54TykN8ZWD4UW2LtBfk=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=adlz2z/Ic012Y5WwCfuPMYxmbQwZyXqsIuDhlKSiuuoqdHXbtdyNkL2f6zOi2hHFktv4Lu7zoV7cql6d3yQBvMnzF+GBgTUksAuRpxMR+rc3HPoYM7gb26Z3mJEoCU8v+AM67CcSIYF71HEaskh+tVeSoAfna2+LnRkrKAdCpm4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=codethink.co.uk; spf=pass smtp.mailfrom=codethink.com; dkim=pass (2048-bit key) header.d=codethink.co.uk header.i=@codethink.co.uk header.b=24OwV5Ie; arc=none smtp.client-ip=78.40.148.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=codethink.co.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=codethink.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=codethink.co.uk header.i=@codethink.co.uk header.b="24OwV5Ie" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codethink.co.uk; s=imap5-20230908; h=Sender:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:In-Reply-To: References; bh=mBt1BSbF9CMyP7fQf+jON60+Xb+8+lotJch+Ef/gLMk=; b=24OwV5IeG72COC AgXAFILQxY+MZiFtdG2xNKI5QEAFan4Q1v48qHSxPlWpwD1yREpczplM93e4G+SXxUGPYQiHFkpbN VZLxLuuje7+bJecaTHFJY1fyvP7+EudR0b5LYBYEBhtr4aBGxPDwOrruTL4d7j/qtVqHL1wPAgYB5 NbwAYOsVaTJSEvuLNtZPjugMBpJboUtT/4tDavF00TC/ijiOUdxoCLh4KmLFaMjtKL+yLlKx0WxDY uE+hOPqosH4+z4A3P8rKemT+GCABQ/FvG+lnOSOIqStKxlSo6sfHMhlY41Cug05+vjDH/L9lg0PyL WUqMMgMJl+X345wQptaw==; Received: from [63.135.74.212] (helo=rainbowdash) by imap5.colo.codethink.co.uk with esmtpsa (Exim 4.94.2 #2 (Debian)) id 1vdQQX-008gd4-B9; Wed, 07 Jan 2026 10:06:05 +0000 Received: from ben by rainbowdash with local (Exim 4.99.1) (envelope-from ) id 1vdQQW-00000000dnn-3OGY; Wed, 07 Jan 2026 10:06:04 +0000 From: Ben Dooks To: linux-kernel@vger.kernel.org Cc: x86@kernel.org, bp@alien8.de, mingo@redhat.com, tglx@linutronix.de, Ben Dooks Subject: [PATCH] x86/cpufeatures: fix build warnings with sparse of capflags.o Date: Wed, 7 Jan 2026 10:06:03 +0000 Message-Id: <20260107100603.152990-1-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.37.2.352.g3c44437643 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: srv_ts003@codethink.com Content-Type: text/plain; charset="utf-8" It seems that sparse builds don't define __KERNEL__ which means the check step of capflags.c is triggering the following sparse warnings. Fix this by checking for __CHECKER__ in addition to the __KERNEL__ check. Fixes the following sparse warnings: arch/x86/kernel/cpu/capflags.c:5:12: warning: symbol 'x86_cap_flags' was no= t declared. Should it be static? arch/x86/kernel/cpu/capflags.c:295:12: warning: symbol 'x86_bug_flags' was = not declared. Should it be static? arch/x86/kernel/cpu/capflags.c:343:12: warning: symbol 'x86_vmx_flags' was = not declared. Should it be static? Signed-off-by: Ben Dooks --- arch/x86/include/asm/cpufeature.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufe= ature.h index 3ddc1d33399b..484553adc27d 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h @@ -4,7 +4,7 @@ =20 #include =20 -#if defined(__KERNEL__) && !defined(__ASSEMBLER__) +#if (defined(__KERNEL__) || defined(__CHECKER__)) && !defined(__ASSEMBLER_= _) =20 #include #include --=20 2.37.2.352.g3c44437643