From patchwork Wed Dec 13 12:49:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 13490916 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8D53AC4167B for ; Wed, 13 Dec 2023 12:50:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Date:Message-Id:MIME-Version:Subject:Cc :To:From:References:In-Reply-To:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=q7aZ2bcXChzj+UYJMHI76bZ0eUmxnoPBcommxyQCi5M=; b=wUGP9CDJtZJGXS NMUMhyjo6/0svlGODBslo4+y82In8pDPBF77JwobBr1jccbmY5WMRFRW8jOO6HyxECEcf75hlkYau zh8CzaPO9ocPHn4EgkA91zCBofohq0zVzo4/XLJ04/xCCqrV8H1Iubpc/roxemADgEvR6wIg+dXyr e1rDmtBZEqvUKiXdhn6likf1Yb0sZSeA6EYqbjuoAm7zUwhLWnhx3utrP6YXiepl6m1XQ7fUDerGb twU3l5hRMn2+syrMSr/QKyZ6D4ZK4ppDkM38Llwo/EzG/5NI3Ma0DYJXAwfPUUk735YxJUJHaPKcR kEJM/WXo3ZXmSVEpnAUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDOgw-00EeaN-2l; Wed, 13 Dec 2023 12:50:22 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDOgi-00EeKi-2F; Wed, 13 Dec 2023 12:50:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=oPeme1Idl7Or3jdMYkiOWAf3GphaNVmJTG+4LYE0TBg=; b=AGYycIJJ1HK/RXsJpD4nE7Zosg WJHYKYmLu98XkzqmJxjN/Ejtq/87JEgiJq/3fsU9u2Vd0hVEkWMPHhvaTrGlWOQ+97ar8oNzGWutu zwVgUDd3oP50s85O+DSifKJCgZ0JIs8pUWOFCFqGeW6fnNa89FFJLrhiU78AxYABi2PgZ7OnVC5c0 mPqNLJhbC8p01YDBwk8YMbQ1VHZo97tq6RvwJNYezmZ++MFgEFBeOtxkMaRAL3gitdNMUh43SuFR0 nzuNl8YomZk5pxXIBUm73pO8DiZslIc/orjfmoZgpp64FReJp0wHLUanvPkpT2mDNEgsjhJ+AqeOb RDyeENMw==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:50920 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rDOgV-0008Ei-1G; Wed, 13 Dec 2023 12:49:55 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rDOgX-00DvkQ-Lg; Wed, 13 Dec 2023 12:49:57 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: linux-pm@vger.kernel.org, loongarch@lists.linux.dev, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, kvmarm@lists.linux.dev, x86@kernel.org, acpica-devel@lists.linuxfoundation.org, linux-csky@vger.kernel.org, linux-doc@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org Cc: Salil Mehta , Jean-Philippe Brucker , jianyong.wu@arm.com, justin.he@arm.com, James Morse Subject: [PATCH RFC v3 09/21] ACPI: convert acpi_processor_post_eject() to use IS_ENABLED() MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Wed, 13 Dec 2023 12:49:57 +0000 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_045008_742978_4B12FA37 X-CRM114-Status: UNSURE ( 9.28 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Rather than ifdef'ing acpi_processor_post_eject() and its use site, use IS_ENABLED() to increase compile coverage. Signed-off-by: Russell King (Oracle) Reviewed-by: Jonathan Cameron --- drivers/acpi/acpi_processor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index b6f5005985c3..01c460881662 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -457,12 +457,14 @@ static int acpi_processor_add(struct acpi_device *device, return result; } -#ifdef CONFIG_ACPI_HOTPLUG_PRESENT_CPU /* Removal */ static void acpi_processor_post_eject(struct acpi_device *device) { struct acpi_processor *pr; + if (!IS_ENABLED(CONFIG_ACPI_HOTPLUG_PRESENT_CPU)) + return; + if (!device || !acpi_driver_data(device)) return; @@ -501,7 +503,6 @@ static void acpi_processor_post_eject(struct acpi_device *device) free_cpumask_var(pr->throttling.shared_cpu_map); kfree(pr); } -#endif /* CONFIG_ACPI_HOTPLUG_PRESENT_CPU */ #ifdef CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC bool __init processor_physically_present(acpi_handle handle) @@ -626,9 +627,7 @@ static const struct acpi_device_id processor_device_ids[] = { static struct acpi_scan_handler processor_handler = { .ids = processor_device_ids, .attach = acpi_processor_add, -#ifdef CONFIG_ACPI_HOTPLUG_PRESENT_CPU .post_eject = acpi_processor_post_eject, -#endif .hotplug = { .enabled = true, },