linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Liguang Zhang <zhangliguang@linux.alibaba.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ACPI / amba: Fix resource name in /proc/iomem
Date: Wed, 30 Jun 2021 20:02:11 +0200	[thread overview]
Message-ID: <CAJZ5v0j3oCqW-D-Z3jRP9w8uETsYjxB+=Tsm3-B5FNOYR1QgeQ@mail.gmail.com> (raw)
In-Reply-To: <20210629112748.23734-1-zhangliguang@linux.alibaba.com>

On Tue, Jun 29, 2021 at 1:28 PM Liguang Zhang
<zhangliguang@linux.alibaba.com> wrote:
>
> In function amba_handler_attach(), dev->res.name is initialized by
> amba_device_alloc. But when address_found is false, dev->res.name is
> assigned to null value, which leads to wrong resource name display in
> /proc/iomem, "<BAD>" is seen for those resources.
>
> Signed-off-by: Liguang Zhang <zhangliguang@linux.alibaba.com>
> ---
>  drivers/acpi/acpi_amba.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/acpi/acpi_amba.c b/drivers/acpi/acpi_amba.c
> index 49b781a9cd97..ab8a4e0191b1 100644
> --- a/drivers/acpi/acpi_amba.c
> +++ b/drivers/acpi/acpi_amba.c
> @@ -76,6 +76,7 @@ static int amba_handler_attach(struct acpi_device *adev,
>                 case IORESOURCE_MEM:
>                         if (!address_found) {
>                                 dev->res = *rentry->res;
> +                               dev->res.name = dev_name(&dev->dev);
>                                 address_found = true;
>                         }
>                         break;
> --

Applied as 5.14-rc1 material, thanks!

      reply	other threads:[~2021-06-30 18:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-29 11:27 [PATCH] ACPI / amba: Fix resource name in /proc/iomem Liguang Zhang
2021-06-30 18:02 ` 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='CAJZ5v0j3oCqW-D-Z3jRP9w8uETsYjxB+=Tsm3-B5FNOYR1QgeQ@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=zhangliguang@linux.alibaba.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).