From mboxrd@z Thu Jan 1 00:00:00 1970 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 C73F7CD37B0 for ; Mon, 18 Sep 2023 04:07:16 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ybe8a/A1ODZqckdcsRvFcFgJfo2pd3Tr+1tno51MBhc=; b=SSNJw70eGLqroP J+oA42CqZkbtwV7wOXs9EeBF3XNOmfn/F8RN6KSqytRM8eHqdrPR8pQRQZDiYjTno8Sk5kKpMbyHv JfUA8u8gR0cVypi4UFcXZzIGSwJmTHqSY1xxeIibFzdZTeNfcr2zHbMWZ+lxtfOBgy1s2mnIJ4qLw ieqi8KFiihZZb24wRGjYhR48B9ZotLtb8oZd+zmkja+mW1rirAO/Ap8l38MMBYooDxcykA6teIRkv K/tHA3DsU20uLPs2RBzy7690qKLTVWX+Ke1L6wZ4F8AVSSQjGDsgwyVJAtVemrAOZxor/kdjKazah S240SbTnACCGR1ejTnMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qi5XA-00ELEP-0A; Mon, 18 Sep 2023 04:06:52 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qi5X7-00ELCZ-1R for linux-arm-kernel@lists.infradead.org; Mon, 18 Sep 2023 04:06:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695009999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RyEnCFT5C38bhUURLkGzvUajSXRR1/fSXXPcrqWJ/i0=; b=Sx38KtqaNLgedsFfbIOY//4AFSkSAAWhG2kIPULbdOvkEWUHgkWHlWpNt/7EeGiDf3AY37 iyV1P56pM4BW/c8wZgSAwQToP7oa+9fzqjZkJP8dq9aRlrZ37ZkD2Ea1iRbl5TgGAvbr1O U/N00cyNvYPRYFsSS16Tmjd+OdiyG30= Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-441-jcQ3ZvavMWqUno0xqTvlFA-1; Mon, 18 Sep 2023 00:06:38 -0400 X-MC-Unique: jcQ3ZvavMWqUno0xqTvlFA-1 Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-5703f4f8acdso2730608a12.0 for ; Sun, 17 Sep 2023 21:06:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695009997; x=1695614797; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RyEnCFT5C38bhUURLkGzvUajSXRR1/fSXXPcrqWJ/i0=; b=kQMfWdNP5o0zYg6oh1L/4828//2/TyLNmkf4e0ZlIO95LqlRl4hXMJSqIX7dBN9Iv7 27s0QAeyPU0KezLdOHpgeBn7mUlXKswCbqFUm9D50vIoZuSs50ERtS0A9s4MimEZZpNK 34f3IpcoWDnVJv5qNMmwmxoORIeUi3wq5NwfaDX2vRUQQQ1JKWIZxD4SG2LIPo3DY4IZ 1nslEh5+ZYMHblRbcgq6V8mPPFeZHy3XOOl+mI9UQsOUV4ClVc4rM9PVQFQOTdqrsm7E YqmGhlBikjRrDlueuytXgC5vIDqSltui491JTQBLZcCN4/CW0uxxl96CDfSQ1AQBEVB/ Ev3w== X-Gm-Message-State: AOJu0YwU8LUncMl2IdJLsUwM5iPQl1l4CpWB/0cmPqXrizsG4H55dRkv bHK4HQHujgUjSqNk2AhYXgzkZDgI++nYx9UhAX1lnwZNm5sZglbDyu9WL4gT7eQkBvtnNyXL3vu mKsi3o6T1CfTMFuPE3XLMrD7qcteO7zkREdg= X-Received: by 2002:a17:902:ed13:b0:1c4:2639:fcac with SMTP id b19-20020a170902ed1300b001c42639fcacmr6826557pld.44.1695009997184; Sun, 17 Sep 2023 21:06:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEF065/Z94SfXDjWgy8eNRhRV8ONjtcc1kg9eJW1xxYmQI4hKUxuHGFuBMDdEioAhl0IB04WA== X-Received: by 2002:a17:902:ed13:b0:1c4:2639:fcac with SMTP id b19-20020a170902ed1300b001c42639fcacmr6826541pld.44.1695009996903; Sun, 17 Sep 2023 21:06:36 -0700 (PDT) Received: from ?IPV6:2001:8003:e5b0:9f00:dbbc:1945:6e65:ec5? ([2001:8003:e5b0:9f00:dbbc:1945:6e65:ec5]) by smtp.gmail.com with ESMTPSA id ju3-20020a170903428300b001bdb8c0b578sm5892366plb.192.2023.09.17.21.06.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 17 Sep 2023 21:06:36 -0700 (PDT) Message-ID: <4e5aaed1-bf7d-18a8-0f77-8f29bb2e43bc@redhat.com> Date: Mon, 18 Sep 2023 14:06:28 +1000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [RFC PATCH v2 12/35] ACPI: Use the acpi_device_is_present() helper in more places To: James Morse , 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 Cc: x86@kernel.org, Salil Mehta , Russell King , Jean-Philippe Brucker , jianyong.wu@arm.com, justin.he@arm.com References: <20230913163823.7880-1-james.morse@arm.com> <20230913163823.7880-13-james.morse@arm.com> From: Gavin Shan In-Reply-To: <20230913163823.7880-13-james.morse@arm.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230917_210649_554675_B28C1556 X-CRM114-Status: GOOD ( 16.21 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 9/14/23 02:38, James Morse wrote: > 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 > --- > drivers/acpi/scan.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Gavin Shan > 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; > } _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel