linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: yaoaili126@163.com
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>, James Morse <james.morse@arm.com>,
	Tony Luck <tony.luck@intel.com>, Borislav Petkov <bp@alien8.de>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Stable <stable@vger.kernel.org>,
	yangfeng1@kingsoft.com, yaoaili@kingsoft.com
Subject: Re: [PATCH] ACPI, APEI, Fix error return value in apei_map_generic_address()
Date: Mon, 16 Nov 2020 19:30:02 +0100	[thread overview]
Message-ID: <CAJZ5v0gCAj2dBE6vu4atvK+ZD4w7tvQ_+j99g0Jj2=X31YsUtQ@mail.gmail.com> (raw)
In-Reply-To: <20201110083334.456893-1-yaoaili126@163.com>

On Tue, Nov 10, 2020 at 9:50 AM <yaoaili126@163.com> wrote:
>
> From: Aili Yao <yaoaili@kingsoft.com>
>
> From commit 6915564dc5a8 ("ACPI: OSL: Change the type of
> acpi_os_map_generic_address() return value"),
> acpi_os_map_generic_address() will return logical address or NULL for
> error, but for ACPI_ADR_SPACE_SYSTEM_IO case, it should be also return 0
> as it's a normal case, but now it will return -ENXIO. So check it out for
> such case to avoid einj module initialization fail.
>
> Fixes: 6915564dc5a8 ("ACPI: OSL: Change the type of
> acpi_os_map_generic_address() return value")
> Cc: <stable@vger.kernel.org>
> Reviewed-by: James Morse <james.morse@arm.com>
> Tested-by: Tony Luck <tony.luck@intel.com>
> Signed-off-by: Aili Yao <yaoaili@kingsoft.com>
> ---
>  drivers/acpi/apei/apei-base.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c
> index 552fd9f..3294cc8 100644
> --- a/drivers/acpi/apei/apei-base.c
> +++ b/drivers/acpi/apei/apei-base.c
> @@ -633,6 +633,10 @@ int apei_map_generic_address(struct acpi_generic_address *reg)
>         if (rc)
>                 return rc;
>
> +       /* IO space doesn't need mapping */
> +       if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_IO)
> +               return 0;
> +
>         if (!acpi_os_map_generic_address(reg))
>                 return -ENXIO;
>
> --

Applied as 5.10-rc material, thanks!

      reply	other threads:[~2020-11-16 18:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10  8:33 [PATCH] ACPI, APEI, Fix error return value in apei_map_generic_address() yaoaili126
2020-11-16 18:30 ` 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='CAJZ5v0gCAj2dBE6vu4atvK+ZD4w7tvQ_+j99g0Jj2=X31YsUtQ@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=stable@vger.kernel.org \
    --cc=tony.luck@intel.com \
    --cc=yangfeng1@kingsoft.com \
    --cc=yaoaili126@163.com \
    --cc=yaoaili@kingsoft.com \
    /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).