Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1780874rdb; Wed, 31 Jan 2024 08:52:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IHadk/R5MtmJfGuXbC1lmo1QBlGvN601Nng0hFjJIyxibZH0x4JJ0USSBgmOyPuZLFV2PIu X-Received: by 2002:a05:6102:c02:b0:46c:b7ac:1dbb with SMTP id x2-20020a0561020c0200b0046cb7ac1dbbmr82393vss.15.1706719958169; Wed, 31 Jan 2024 08:52:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706719958; cv=pass; d=google.com; s=arc-20160816; b=e7wQ5RpQO/uW+gDWFYyTcOc18wtFjGMV5jJXwpDtdo4m0ASEHp9/qjWA21N8YtPFCC fgLz4IRz5/YvrwVE1AYmDei1NuM/qGg28HqsZw+QCslQu39RgsC8UU18fjGs/Cd//5EI EKIh5iDelTOACV4aUhKviUyqJg+tX9ve0NT/lczZbk2VLCJfhrfibo+DZL4GE9bgwiaD 6gcURgu3fqOFuJLO/b/ORsRBDYcc7PJMafEbTNErLXYGhdT9eFnSHkGdfZXTi2kunYmD Q+1Jabqhk9vtEXg0PKXhCF7kZDfE3+QNaOFEqOqsPu4WpNJo4VXstoQkaIRU31FdrBRV R+ew== 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=wlvpaCc5Nyg6oVFPnNuFxILuAsMHcQjpQa2kK1vnFRk=; b=fGvJ1ovlRfJ6v7ofCqmDNcnH6240D4Qnv9qz8tXt/7mIBibuaDBXKRR1voBEDJNZ5G I1+LBTmWS3J5USR9V5/MAYebJvGDr17Qx9qbMobylS+GmqyuU4qCKSUHrOgV55Hbx6c2 W/2rO7+BsMYb4/Yo/SK2R+gMRMNzXxId0mZX99QLk1d4WU0uPJvragUOW4STN/ZmtQBU rtjMxjvCISscRj5SK3XqbCegBs+9x6JvQiznN73miHF6k8F4jJQHZLFDBAHtiXAHSSR2 HcM8O2wgMRfHlQ2HfvlaFHHH1LD4ViCNCSoa8W/Wkz3Z83YbDanzwlPtlOm/hgvJJZEA h5XA==; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46832-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk X-Forwarded-Encrypted: i=1; AJvYcCUSrTg+hwr6Q9lgNnd9MACvpUatbFHxXcawnMBoPmmB1DRWaDO+GdWDTIqofP9TPuONqmYvVa/5BunsIaEStQD0msGFwZc7m38bS7iUsQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id r4-20020ad45764000000b0067f483722c0si6673812qvx.208.2024.01.31.08.52.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 08:52:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46832-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46832-linux.lists.archive=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C28B61C2140C for ; Wed, 31 Jan 2024 16:52:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 64E5D12FF89; Wed, 31 Jan 2024 16:50:28 +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 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Sender: Russell King Date: Wed, 31 Jan 2024 16:50:07 +0000 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, }, -- 2.30.2