* [PATCH] ACPI: OSL: fix __iomem type on return acpi_os_map_generic_address()
@ 2026-03-11 10:58 Ben Dooks
2026-03-11 11:32 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2026-03-11 10:58 UTC (permalink / raw)
To: linux-acpi, rafael; +Cc: linux-kernel, Ben Dooks
The pointer returned from acpi_os_map_generic_address() is
tagged with __iomem, so make the rv it is returned to also
of void __iomem * type.
Fixes the following sparse warning:
drivers/acpi/osl.c:1686:20: warning: incorrect type in assignment (different address spaces)
drivers/acpi/osl.c:1686:20: expected void *rv
drivers/acpi/osl.c:1686:20: got void [noderef] __iomem *
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
drivers/acpi/osl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 5b777316b9ac..62b9c83d4f20 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1681,7 +1681,7 @@ acpi_status __init acpi_os_initialize(void)
* Use acpi_os_map_generic_address to pre-map the reset
* register if it's in system memory.
*/
- void *rv;
+ void __iomem *rv;
rv = acpi_os_map_generic_address(&acpi_gbl_FADT.reset_register);
pr_debug("%s: Reset register mapping %s\n", __func__,
--
2.37.2.352.g3c44437643
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ACPI: OSL: fix __iomem type on return acpi_os_map_generic_address()
2026-03-11 10:58 [PATCH] ACPI: OSL: fix __iomem type on return acpi_os_map_generic_address() Ben Dooks
@ 2026-03-11 11:32 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2026-03-11 11:32 UTC (permalink / raw)
To: Ben Dooks; +Cc: linux-acpi, rafael, linux-kernel
On Wed, Mar 11, 2026 at 11:58 AM Ben Dooks <ben.dooks@codethink.co.uk> wrote:
>
> The pointer returned from acpi_os_map_generic_address() is
> tagged with __iomem, so make the rv it is returned to also
> of void __iomem * type.
>
> Fixes the following sparse warning:
>
> drivers/acpi/osl.c:1686:20: warning: incorrect type in assignment (different address spaces)
> drivers/acpi/osl.c:1686:20: expected void *rv
> drivers/acpi/osl.c:1686:20: got void [noderef] __iomem *
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
> drivers/acpi/osl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
> index 5b777316b9ac..62b9c83d4f20 100644
> --- a/drivers/acpi/osl.c
> +++ b/drivers/acpi/osl.c
> @@ -1681,7 +1681,7 @@ acpi_status __init acpi_os_initialize(void)
> * Use acpi_os_map_generic_address to pre-map the reset
> * register if it's in system memory.
> */
> - void *rv;
> + void __iomem *rv;
>
> rv = acpi_os_map_generic_address(&acpi_gbl_FADT.reset_register);
> pr_debug("%s: Reset register mapping %s\n", __func__,
> --
Applied as 7.0-rc material, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-11 11:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-11 10:58 [PATCH] ACPI: OSL: fix __iomem type on return acpi_os_map_generic_address() Ben Dooks
2026-03-11 11:32 ` 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
all inboxes | Powered by JetHome®