From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-180.mta0.migadu.com (out-180.mta0.migadu.com [91.218.175.180]) (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 7AE3919C54E for ; Tue, 4 Aug 2026 11:53:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785844410; cv=none; b=tfHVIkId7c17417f4jg0zg3xKLcj6e57DeVFJgSRGw1JAowZdL1kl/gO7JES27dcL/x6MV5c+7T6xuJAgXLgB2JXp8bzTwR+3ejK/Qoy1HCVQW8Ax/cKK33EXStrszbfluKvAL1VwiWUvO2Ea4qVKPje2ntfzU+9GwvfoQuz9hI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785844410; c=relaxed/simple; bh=yCocIcBSQxhrvkr/An4u0OEsiR0HlD5i2GqKLVvii9g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qdDws74iZKkUIbzLKJ/tr/2g/0l7NT+CXTrarXzPnc/tWgLftG7lduS2Dp0DC5CARWyYXXZ1VWitcD124QypRRhuW7vvG94Cm14O1ol90y8NYDr1OS6xix7/NtDZlivd/2g3YLCNj6aSPGmzUvnqFnycb6V5OMxNuGT4DaVm1Ck= 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=i8H5GByF; arc=none smtp.client-ip=91.218.175.180 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="i8H5GByF" 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=1785844406; 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=DCREjaozjuaj8eZTr1zOS/+ertWx53rponNwF5vSt18=; b=i8H5GByFxC1Lb19M7uMTyBg276VHRs1UU6gEjcxnURvCd8hsOVqb43fidkgA6zS6U3AXsI OTzmsp0/DHtIjKoJ6Oav2gIlQHw0LAc25gHG7hykoh/+DcwOcquTuam++XioXLdtWgFqfA KP0wghaWlaFwGcnfTx2sLhKn+4BxVCc= From: Thorsten Blum To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Ard Biesheuvel , "Mike Rapoport (Microsoft)" , Andrew Morton , Arnd Bergmann , Thomas Zimmermann , "Pratyush Yadav (Google)" , Harshit Mogalapalli , Breno Leitao Cc: Thorsten Blum , Ingo Molnar , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] x86: Use IS_ENABLED() for built-in-or-module checks Date: Tue, 4 Aug 2026 13:52:25 +0200 Message-ID: <20260804115227.62158-4-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=2079; i=thorsten.blum@linux.dev; h=from:subject; bh=yCocIcBSQxhrvkr/An4u0OEsiR0HlD5i2GqKLVvii9g=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFmFl6qnfQt+Yu1d9sR/0sprc8uzlvks0NJavU+NU+n6E uHNWsFHO0pZGMS4GGTFFFkezPoxw7e0pnKTScROmDmsTCBDGLg4BWAiXuWMDBu59n4xr3bb/Kng buv7VIX7fk8let4+6T4w6cKux9wHPtxg+KeyUHNnzXkW37XBbhcPJH42c91/Y1nvrpOrl2acOct +ZDEjAA== X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Replace open-coded built-in-or-module checks for CONFIG_APM, CONFIG_EDD, and CONFIG_X86_SPEEDSTEP_SMI with IS_ENABLED(). Signed-off-by: Thorsten Blum --- arch/x86/boot/edd.c | 2 +- arch/x86/boot/main.c | 10 ++++------ arch/x86/kernel/setup.c | 5 ++--- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/arch/x86/boot/edd.c b/arch/x86/boot/edd.c index 1fb4bc70cee9..97cad16f6bf2 100644 --- a/arch/x86/boot/edd.c +++ b/arch/x86/boot/edd.c @@ -15,7 +15,7 @@ #include #include "string.h" -#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) +#if IS_ENABLED(CONFIG_EDD) /* * Read the MBR (first sector) from a specific device. diff --git a/arch/x86/boot/main.c b/arch/x86/boot/main.c index 9d0fea18d3c8..4e382d95ef9a 100644 --- a/arch/x86/boot/main.c +++ b/arch/x86/boot/main.c @@ -164,14 +164,12 @@ void main(void) query_ist(); /* Query APM information */ -#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE) - query_apm_bios(); -#endif + if (IS_ENABLED(CONFIG_APM)) + query_apm_bios(); /* Query EDD information */ -#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) - query_edd(); -#endif + if (IS_ENABLED(CONFIG_EDD)) + query_edd(); /* Set the video mode */ set_video(); diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 46882ce79c3a..fca42b178b3c 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -120,8 +120,7 @@ struct cpuinfo_x86 new_cpu_data; struct apm_info apm_info; EXPORT_SYMBOL(apm_info); -#if defined(CONFIG_X86_SPEEDSTEP_SMI) || \ - defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE) +#if IS_ENABLED(CONFIG_X86_SPEEDSTEP_SMI) struct ist_info ist_info; EXPORT_SYMBOL(ist_info); #else @@ -230,7 +229,7 @@ char builtin_cmdline[COMMAND_LINE_SIZE] = CONFIG_CMDLINE; bool builtin_cmdline_added __ro_after_init; #endif -#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) +#if IS_ENABLED(CONFIG_EDD) struct edd edd; #ifdef CONFIG_EDD_MODULE EXPORT_SYMBOL(edd);