Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1319512pxu; Sat, 5 Dec 2020 11:25:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxH7HYbyLufZz67mV2U7BHSwYJDlGYuA8IR4nYQoMo2IhR7nswo40puJ/1D+FohV1XzjJ6B X-Received: by 2002:a50:ee97:: with SMTP id f23mr12824281edr.311.1607196336746; Sat, 05 Dec 2020 11:25:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607196336; cv=none; d=google.com; s=arc-20160816; b=J96vnmiXO/JGhNK0Upi+ufGpeB03+MCyi8to/mJrKhwO/oXpOU4U4AV4CTbjsQGMgi MnKDwhuyUwR8yAwsthROTQi2ep6BsT/x6NJgRTKjOt5R/T/LkUGxJoNBZMoBkOKC20BA FUnp7wa2r1vlC6EKEOVDGPVMIllJBhEymTL4JiDjzYEQQndJTYY/upt2/X4rXytHwx7b 3ICVWAU5Y6WXlzbSnTnRYtLE9v2YOHuMpB1DP+xkYxdlTfm3BlxSvSpOc71IALjYnSJV oK8mwKj6pvGbukpdqbn17kgGarWA7Wz8dg6oGnLwRA5VmShQ3qRZJdag2VEY728bAi97 8fGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=uAwrHeOd5+bmY41wtmIeghmh5nTfzYtl4jkbWdwUkwM=; b=JErFMfe5QN4+4tqiUSsaJFppgQGpMa2Oqhq4GJjz9tI+9x6lDoZI4mRZOz9I29eDw7 ZvsWmC9J4qcqAi8ht95llH2t+V9kJYHvoawl81R7Qp1Dcyc+stWgf3hMPlIsCFR7kQm1 wec5mjhCC6ZsqsKYhQo9tC2WEFVUVQ3TDzJjreyuej4gsu98OXoq8pqLpimjqaspViI1 eguOPhCnHbM5jPlBDMndYp1qM9AdTdDxzdK9yosubTg7ppLx04p1rn8VGu2+I8S74+bM HesEFbKMucwzqKKhLDXomegJgWNX/GUe8bS90XStpisYHWz0HnVvvpT+DE3ljSYLDTDY 4RSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x13si3882183ejb.243.2020.12.05.11.25.14; Sat, 05 Dec 2020 11:25:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726525AbgLETWr (ORCPT + 99 others); Sat, 5 Dec 2020 14:22:47 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:42888 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727973AbgLETWe (ORCPT ); Sat, 5 Dec 2020 14:22:34 -0500 Received: from 89-77-60-66.dynamic.chello.pl (89.77.60.66) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.530) id 7e1b4f5eab2a3e4d; Sat, 5 Dec 2020 16:21:52 +0100 From: "Rafael J. Wysocki" To: Daniel Scally Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, lenb@kernel.org, mika.westerberg@linux.intel.com Subject: Re: [PATCH] acpi: resource: Use AE_ABORT_METHOD to terminate acpi_dev_get_resources() Date: Sat, 05 Dec 2020 16:21:51 +0100 Message-ID: <2246133.BJYN6MDhT9@kreacher> In-Reply-To: <20201204002740.300109-1-djrscally@gmail.com> References: <20201204002740.300109-1-djrscally@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, December 4, 2020 1:27:40 AM CET Daniel Scally wrote: > Switching this function to AE_CTRL_TERMINATE broke the documented > behaviour of acpi_dev_get_resources() - AE_CTRL_TERMINATE does not, in > fact, terminate the resource walk because acpi_walk_resource_buffer() > ignores it (specifically converting it to AE_OK), referring to that > value as "an OK termination by the user function". This means that > acpi_dev_get_resources() does not abort processing when the preproc > function returns a negative value. > > Revert to AE_ABORT_METHOD > > Fixes: 8a66790b7850 ("ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks") > Signed-off-by: Daniel Scally This is simply a revert of the above commit, so it would be better to present it as a revert explicitly. > --- > drivers/acpi/resource.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c > index ad04824ca3ba..f2f5f1dc7c61 100644 > --- a/drivers/acpi/resource.c > +++ b/drivers/acpi/resource.c > @@ -541,7 +541,7 @@ static acpi_status acpi_dev_process_resource(struct acpi_resource *ares, > ret = c->preproc(ares, c->preproc_data); > if (ret < 0) { > c->error = ret; > - return AE_CTRL_TERMINATE; > + return AE_ABORT_METHOD; > } else if (ret > 0) { > return AE_OK; > } >