Message ID | E1qvJ8l-00AqOy-J5@rmk-PC.armlinux.org.uk |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp2014544vqx; Tue, 24 Oct 2023 08:16:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFTLZcod9VO04nx/ByCAJOKZMEfam/TIQnjwGqekQNXttbHY1b07sgsFvBK7MgIRXZZyBm2 X-Received: by 2002:a17:903:2291:b0:1c0:a5c9:e072 with SMTP id b17-20020a170903229100b001c0a5c9e072mr11412650plh.11.1698160618070; Tue, 24 Oct 2023 08:16:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698160618; cv=none; d=google.com; s=arc-20160816; b=KjqjWBzADdZT2f2LFAiV6DgzHifvlVQ+opIn1d5HIym0Qt4WZgh7BN+1jZ/6Xf3SuE rAPv/b6KPCUiRDFD59eDXOutowlEbsqCCNQE7AjAh1WRtzbme+9lo6Rv41O3iiz3dZTZ diDdtM4IgWNmZr+4FpMDBPid3MfSJj+jTHn+2zeyfTQc0SPEaOjt5aWctwr1v7O1lvPb jfhTSp52Bn/rESOrG0ZHMo3Qtivcn2FLC5uKVe8Ty8yNk00iBTkcKddrh6diUdvlluVR AZSWQnNG7nGuyx+KtKwHSJdV+v9ojM2A91JZwJRgAceVDIkGNEvPTeVFPxaJhQXNPOTb toCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:sender:message-id:content-transfer-encoding :content-disposition:mime-version:subject:cc:to:from:references :in-reply-to:dkim-signature; bh=jgOua7XG/wnLF83C9dm9FB0uL6rg1MROYA8EjBMPhHA=; fh=SkTV5xOrq7hxTIOggvbIOXu+48dqXijvMNKji0VGfy8=; b=wtJAod/bu3ay9oJX2HKzl/xhGWOkdShxysG4qVc4bXajVg995aBOY87XStSVMHoreT Evkj/XejxgvP9D6Dmuqi2WNeQb1xjmvzjFGh/ju8iKinYegF8gBnTk/Sl/WtzXkeeP8+ QfCIuBeFXXihMpNX1O+nlTQVrpEEnEus/YZz2cNamRU2qC3IPEPCVVlS7qdSsa0tlT1M HkC2dqFRzmTUGkcwKq5zWHvIDUM9QR92VyUD1cYCieKmY21vz1sQ7Mjj+ISfGntEbFDE 7Qy5Fp8wSWK2UZqd7lY6lzsyoMZlU/33m5ptttOpamhFwofLaC/2esuNF11jT6xg+puj e+aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=J2mp06g9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id l21-20020a170902eb1500b001c9c83947d1si8107893plb.645.2023.10.24.08.16.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 08:16:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=J2mp06g9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id B69D78023903; Tue, 24 Oct 2023 08:16:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234655AbjJXPQd (ORCPT <rfc822;aposhian.dev@gmail.com> + 27 others); Tue, 24 Oct 2023 11:16:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233151AbjJXPQ1 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 24 Oct 2023 11:16:27 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FD17DE; Tue, 24 Oct 2023 08:16:26 -0700 (PDT) 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=jgOua7XG/wnLF83C9dm9FB0uL6rg1MROYA8EjBMPhHA=; b=J2mp06g9NQqtqT3uv6Ylw6MUGl t7fj+2TzW7pWDsG+AfTTqVbVrFQ7E01xmS7KhXSk9a3NMdtC4NdTDMho53IISz5KGe6ZPGeG+M1o8 W7UuBj8Tu6mPnTeK65XF5jjxwYD+3gTzqrzc4PQIgOnvIgKky6ZpA8cWYur8KkqIX6A8NlQL7S/oY ccYWnfYCURmqRXx13tS5qqYWGz+nejtRLJuL6igjZaiOoVIjRQxerM0ZboNIvlJyfpSDylqTeHJ5K 2uZgq8xSxHqf9f109wLtiZsaqELT9K1GTBkwTscEaLOpZ9Xbvn05u5bRuwq65t9b9ZPhTuOxhBDtb bjaD9I+g==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:43856 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 <rmk@armlinux.org.uk>) id 1qvJ8k-0004LV-0H; Tue, 24 Oct 2023 16:16:18 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from <rmk@rmk-PC.armlinux.org.uk>) id 1qvJ8l-00AqOy-J5; Tue, 24 Oct 2023 16:16:19 +0100 In-Reply-To: <ZTffkAdOqL2pI2la@shell.armlinux.org.uk> References: <ZTffkAdOqL2pI2la@shell.armlinux.org.uk> From: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> 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, linux-csky@vger.kernel.org, linux-doc@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org Cc: Salil Mehta <salil.mehta@huawei.com>, Jean-Philippe Brucker <jean-philippe@linaro.org>, jianyong.wu@arm.com, justin.he@arm.com, James Morse <james.morse@arm.com>, "Rafael J. Wysocki" <rafael@kernel.org>, Len Brown <lenb@kernel.org> Subject: [PATCH 02/39] ACPI: Use the acpi_device_is_present() helper in more places MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: <E1qvJ8l-00AqOy-J5@rmk-PC.armlinux.org.uk> Sender: Russell King <rmk@armlinux.org.uk> Date: Tue, 24 Oct 2023 16:16:19 +0100 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 24 Oct 2023 08:16:51 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780650468203437572 X-GMAIL-MSGID: 1780650468203437572 |
Series |
ACPI/arm64: add support for virtual cpuhotplug
|
|
Commit Message
Russell King (Oracle)
Oct. 24, 2023, 3:16 p.m. UTC
From: James Morse <james.morse@arm.com> acpi_device_is_present() checks the present or functional bits from the cached copy of _STA. A few places open-code this check. Use the helper instead to improve readability. Signed-off-by: James Morse <james.morse@arm.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Miguel Luis <miguel.luis@oracle.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> --- drivers/acpi/scan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 691d4b7686ee..ed01e19514ef 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -304,7 +304,7 @@ static int acpi_scan_device_check(struct acpi_device *adev) int error; acpi_bus_get_status(adev); - if (adev->status.present || adev->status.functional) { + if (acpi_device_is_present(adev)) { /* * This function is only called for device objects for which * matching scan handlers exist. The only situation in which @@ -338,7 +338,7 @@ static int acpi_scan_bus_check(struct acpi_device *adev, void *not_used) int error; acpi_bus_get_status(adev); - if (!(adev->status.present || adev->status.functional)) { + if (!acpi_device_is_present(adev)) { acpi_scan_device_not_present(adev); return 0; }