* [PATCH] ACPI / amba: Fix resource name in /proc/iomem
@ 2021-06-29 11:27 Liguang Zhang
2021-06-30 18:02 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Liguang Zhang @ 2021-06-29 11:27 UTC (permalink / raw)
To: Rafael J. Wysocki, Len Brown; +Cc: linux-acpi, linux-kernel, Liguang Zhang
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;
--
2.19.1.6.gb485710b
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ACPI / amba: Fix resource name in /proc/iomem
2021-06-29 11:27 [PATCH] ACPI / amba: Fix resource name in /proc/iomem Liguang Zhang
@ 2021-06-30 18:02 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2021-06-30 18:02 UTC (permalink / raw)
To: Liguang Zhang
Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
Linux Kernel Mailing List
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!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-30 18:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).