From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Daniel Scally <djrscally@gmail.com>
Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Len Brown <lenb@kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: [PATCH v2] Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks"
Date: Mon, 7 Dec 2020 14:03:39 +0100 [thread overview]
Message-ID: <CAJZ5v0hWD0BgHQPZXqpzpVq2hfLnt3vmK2tOeNFyKdUNMYdSQw@mail.gmail.com> (raw)
In-Reply-To: <20201205170403.31827-1-djrscally@gmail.com>
On Sat, Dec 5, 2020 at 7:42 PM Daniel Scally <djrscally@gmail.com> wrote:
>
> This reverts commit 8a66790b7850a6669129af078768a1d42076a0ef.
>
> 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.
>
> Signed-off-by: Daniel Scally <djrscally@gmail.com>
> ---
> 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;
> }
> --
Applied as 5.11 material, thanks!
prev parent reply other threads:[~2020-12-07 13:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-05 17:04 [PATCH v2] Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks" Daniel Scally
2020-12-07 13:03 ` Rafael J. Wysocki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJZ5v0hWD0BgHQPZXqpzpVq2hfLnt3vmK2tOeNFyKdUNMYdSQw@mail.gmail.com \
--to=rafael@kernel.org \
--cc=djrscally@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).