Received: by 2002:ab2:7041:0:b0:1f4:bcc8:f211 with SMTP id x1csp199431lql; Fri, 12 Apr 2024 07:55:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVRRkzu3bIU3QMzrWv5pmgJfs1OieyPlIR/UFBF9hBOhW9Ul4RzHUjLVPRuau+7tkFrh0Z4tZs9EKDdQGlnj9ldN46C0FzATs/a24bSlQ== X-Google-Smtp-Source: AGHT+IECBWQZHlpuG7MkD23oN3nNgEjPgcWJSR9oJ8LUFpZlLdQswzTU6SSSiN/MGbHgDcUW3nZ1 X-Received: by 2002:a05:6a20:5530:b0:1a7:556d:db5f with SMTP id ko48-20020a056a20553000b001a7556ddb5fmr2892187pzb.47.1712933759088; Fri, 12 Apr 2024 07:55:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712933759; cv=pass; d=google.com; s=arc-20160816; b=Z8sJgqarsGI4EjomN6clf9RK8s1dEwxnhTKPt4P+ODfvWXbrRCMsaowwpJmBAR5Jk4 RGYtK0jTGpRBU5mbe3eTeIrF8Y02/NRr6mk6zoJJEvWiE7XIkoJhRckgiG8tyjn1kNZ+ S4z2hzrhAVHEnvm5+fWSYbNUu9yzCOw3b2GkIT2+QkeNEZVnXkh26L0NFNdxuRw6DaXw N+So5WWKzZCVq/4X8i8QTzpDFHE6IFXzbZacn90+Z1hynhHPsaG6vTKveQAv1xNjcU83 rPCoNeu95NMADwZfipuctxWtAYLJRfEepmtszXkS5bVtrIIsqXkMxWEnDP/Ntexe8T14 zLww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=fAvgam+m0klEJZWj6pvg/lmoLDhLmZFDa0//1UtChiA=; fh=8XQHdFtte3XOHSEIytMgmfctfSZlTmw2q6RqB5HTTCI=; b=rmQ5sSO3BtuDlXJfmpV35Bi0TAS6O3jVWvN4OqJ0Z+HS09J6Eph5iatu76MzVhG6CH uBhIFcSFElR/QPyTIMzvqpQpnuuC0qOfslfDuC+IFXEpsehgnqiLXpY8gCnCsFfgAiHT wkC+qwxGdTQVAvqWbwecvNzPHvsgjEFes3c+ApNy0fXNKuuLPWaGX5fKkF/4O2lAZnVN QRimySBSN8jKAbKxNhlwWrRcXas9OirfGchODN0qkh8jVEZSeL7uIDwYmwbSySc6R6qr rBHuhMtcbx+ZtJuYgHCLdklKC+sCPI11wyDt7uchbx0j/H0j7K6+dwPnj2EaJuLMpxG7 TqEQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-142860-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142860-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a18-20020a631a12000000b005dc785e4a28si3339276pga.30.2024.04.12.07.55.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 07:55:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142860-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-142860-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142860-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 81F1FB25644 for ; Fri, 12 Apr 2024 14:41:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E3116142E97; Fri, 12 Apr 2024 14:41:26 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (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 9F63F14199C; Fri, 12 Apr 2024 14:41:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712932886; cv=none; b=QRkpiWp4BiZaDScwCWK21YQt3hE6XAliIiR3/YakZEE+RYImHP7mLwoTo0rj3BNaFGKVUsrmR3YQqXxe04GD28E6kC11t48m9Pc4idvULKKjolK5dpTVA9fi+N5lt/1gby6ohX9Yjfqswy3ONlC0dwF8qlboiq5niN8ZdfgW7fI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712932886; c=relaxed/simple; bh=h9Q/p4u1h1HqfFprhL65by7i9QVZUBczkA6t+LZrQF0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YOVR9W0FFqOe1k82uVK3C7/oG1rQlG057P6qex4sY8tWykMNjIjpZM/vGStEdbMsgYN0/ORh16OKl49T68vDkgo0154M/YPlg8L6YNkIAiTcvESTFGlOQ7vNl/BNfn/7IZit++f/XUcghNWrhvLjpaS/aE6rpSA4UAIS3jd+Cp4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VGK2x00Ksz6JB2x; Fri, 12 Apr 2024 22:39:36 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id B87871408FE; Fri, 12 Apr 2024 22:41:22 +0800 (CST) Received: from SecurePC-101-06.china.huawei.com (10.122.247.231) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 12 Apr 2024 15:41:22 +0100 From: Jonathan Cameron To: , , , , , , , , Russell King , "Rafael J . Wysocki" , Miguel Luis , James Morse , Salil Mehta , Jean-Philippe Brucker , Catalin Marinas , Will Deacon CC: , , Subject: [PATCH v5 08/18] ACPI: convert acpi_processor_post_eject() to use IS_ENABLED() Date: Fri, 12 Apr 2024 15:37:09 +0100 Message-ID: <20240412143719.11398-9-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240412143719.11398-1-Jonathan.Cameron@huawei.com> References: <20240412143719.11398-1-Jonathan.Cameron@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: lhrpeml500006.china.huawei.com (7.191.161.198) To lhrpeml500005.china.huawei.com (7.191.163.240) From: Russell King 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) Signed-off-by: Jonathan Cameron --- v5: No change --- 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 6b2ee0643d11..15d89f80857b 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -461,12 +461,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; @@ -505,7 +507,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) @@ -630,9 +631,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.39.2