Skip to contentSkip to conversation

ACPI: OSL: fix __iomem type on return acpi_os_map_generic_address()

PATCH Applied Ben Dooks 2 participants 2 messages Mar 11 ACPI

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 ACPI: OSL: fix __iomem type on return acpi_os_map_generic_address()

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 *

---
 drivers/acpi/osl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/osl.c +1 -1
index 5b777316b9ac..62b9c83d4f20 100644
@@ -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__,
Signature · 1 line
2.37.2.352.g3c44437643
maintainer Applied
#1 lore raw
Quoted 21 lines · 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 *

---
 drivers/acpi/osl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/osl.c +0 -0
index 5b777316b9ac..62b9c83d4f20 100644

drivers/acpi/osl.c acpi_status __init acpi_os_initialize(void)

Quoted 9 lines
drivers/acpi/osl.c +1 -2
@@ -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!