From patchwork Wed Jan 31 16:50:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 194861 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp2019704dyb; Wed, 31 Jan 2024 08:52:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IEi/iUhsNN5BQX7Ui8v4oKmvduGmcegJ1vfE3ILnsS8/2votjnpuGngYucw1MYNti/WKaK4 X-Received: by 2002:a17:906:2415:b0:a35:ec2a:2974 with SMTP id z21-20020a170906241500b00a35ec2a2974mr1584619eja.37.1706719969957; Wed, 31 Jan 2024 08:52:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706719969; cv=pass; d=google.com; s=arc-20160816; b=dBcHcXORLcL5IQSCyH3aOHxPhzV2RrztaA5AIaUZkhAKM5KRBVEcgxidPrIbjkOj3L +M+xWxsXcoux4e3dpcffxPRrKry0T8qiZITLsdXx6R+TZV3g8sDRcDvBz5tMGAOtInGD fO0RSodrt3rOvl4BSC3zWuTwiFuiUIoAi14hVhhT7RTtlyWFD25HCUoyDLkgDnG/UByc +3zVVhdoDaLgge0tmLZmOcgX8rvPfr1Fh/QHOUd/813+NTcVbITZc6r/kjUM33VuYAaQ 7WMdyBDFr+vIie8HK08kTv1zHH+l7vfe6uEO90BiuGyYsnDhvA3Rgt2Vmhg0MxgpYG4u VT0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:sender:message-id:content-transfer-encoding :content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:subject:cc:to:from:references:in-reply-to :dkim-signature; bh=o2MrjFvCOw1b7pTxYA5/NEaOWmpus9U7QuVGDdVa0nE=; fh=h7FxvzhM5wQBPxgT9Y5SjaatEjuLuWpM4+yeU0/y7ZA=; b=v8XVXfkTc0Gb+gblD1EuzhgnTRE6L6KWPfEV3/6t3lXe5RUrZ7x1xPLfzTAhBtLgkX j6Z7BWJ6oyU30/1i/iXsfQ/ptpOwVnM/cl4hmWb4mBk08N67LwXyrX2aRY7HCzhBX6qm 0k2GFuWgAmeUHk6ldKA6oyXXdgMzEqREpM4bDvAIi+WECDrb2McLoMDdWmxzyYYEwo/Z h0gFRVbmxsp68gMF4Pne7qIjjxFASfGiRF66V+WLcGisKUDrJBCDTRYI2A69FXjnWuTu Oa4NLlVmAsJRnP1Pz3SynOn7VjQkApjjGtMOpmwdTLd/NDheUDPX7ptVk+uVgFZHwuw+ 1PiA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="bU/a2cQU"; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-46832-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46832-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk X-Forwarded-Encrypted: i=1; AJvYcCVAscaYos+WWKeMUfpQveDoNP/vhroqwjkjh7+CCpemuoJumLwq9M8h8EwxjkB5XzxoGR+akcmMc+mCAitnpwPlPtAlFA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z26-20020a1709063ada00b00a35cae9d850si3136203ejd.688.2024.01.31.08.52.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 08:52:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46832-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="bU/a2cQU"; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-46832-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46832-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 921061F21CF1 for ; Wed, 31 Jan 2024 16:52:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3D84E12BF05; Wed, 31 Jan 2024 16:50:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="bU/a2cQU" Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (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 493C612FF6D; Wed, 31 Jan 2024 16:50:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706719827; cv=none; b=J9IP8ZZE7um+vezVFjhNuNJ/FQL49nRSvwjvPMnozc+/4bK8NcjwfE8MHK4qkMfuajOXIINILpCV+D9rbh72ie5Xs6AGrE1RKXoIMx1Gn4pxORcpNf7ce5rfB3vjLHDX40YGQYWkliMwSzBUACnUIbYa7NUxogBAZ4o9R++qTeY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706719827; c=relaxed/simple; bh=BiOLuzUeLXKKkwUEvGrU9puRrhIRHU5YxA5gqIR3aTc=; h=In-Reply-To:References:From:To:Cc:Subject:MIME-Version: Content-Disposition:Content-Type:Message-Id:Date; b=Fk/rSpSj3ExxFwHcrIYL9Shtm4H2QmUjU2CQUtBYS/UBJj07glYf1TRUL4Jus6PQbiYXGk8m/2AQmUIi/RnYS3fqccwXsHH9uVo4Zs7Na7UAO1hoUokwxTHrIxLJGV5WuuEm59U/R3IgQV30LwMJA+Qwyo1/x0uXJ8n1UmCWenc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=bU/a2cQU; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk 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=o2MrjFvCOw1b7pTxYA5/NEaOWmpus9U7QuVGDdVa0nE=; b=bU/a2cQUIWp4jFJhM2Z3n0C5WV uet9BddEoodtQ+GVvml+UvDt7YB2LuSm3+WYt9gHC8BESWulwJ7CDhKsY/dV4p92LzgphJLZfyjNc M6PLDkarQ6PzpuRhmreeo64qoAiZHsMFOJekaW5ywN6mOqys4dkJS59ly2KB0nZSf5oUmGYJQpJFf sQUGtj4Du98gprRQDrhgC1LkpUUGVwV7j/IbdbxCPsez4hgIybJUOpJLq1VeQdo6lRfl5XjAcbplW VYj5zQR5GMuZU1AOJhl9BQpqM69MY9d8ZSjlk2b0RNARabo1r7uDnH1z6zZyaWnGuklMnM+ffmIa3 WrzoOnNw==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:56564 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 1rVDmt-0003Ub-31; Wed, 31 Jan 2024 16:50:12 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rVDmp-0027Yn-5x; Wed, 31 Jan 2024 16:50:07 +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 , Jonathan Cameron , "Rafael J. Wysocki" Subject: [PATCH RFC v4 06/15] ACPI: convert acpi_processor_post_eject() to use IS_ENABLED() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Message-Id: Sender: Russell King Date: Wed, 31 Jan 2024 16:50:07 +0000 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789625599130039769 X-GMAIL-MSGID: 1789625599130039769 Rather than ifdef'ing acpi_processor_post_eject() and its use site, use IS_ENABLED() to increase compile coverage. Reviewed-by: Jonathan Cameron Signed-off-by: Russell King (Oracle) --- 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 00809c3b09f7..5351095b6968 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_CPU /* Removal */ static void acpi_processor_post_eject(struct acpi_device *device) { struct acpi_processor *pr; + if (!IS_ENABLED(CONFIG_ACPI_HOTPLUG_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_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_CPU .post_eject = acpi_processor_post_eject, -#endif .hotplug = { .enabled = true, },