[PATCH] RISC-V: ACPI: fix two __iomem cast warnings

Paul Walmsley pjw at kernel.org
Thu Apr 2 14:31:51 PDT 2026


Hi Ben,

On Wed, 11 Mar 2026, Ben Dooks wrote:

> The __acpi_map_table() and __acpi_unmap_table() return and
> take __iomem tagged pointers. Add a cast to fix the sparse
> warnings:
> 
> arch/riscv/kernel/acpi.c:216:30: warning: incorrect type in return expression (different address spaces)
> arch/riscv/kernel/acpi.c:216:30:    expected void [noderef] __iomem *
> arch/riscv/kernel/acpi.c:216:30:    got void *
> arch/riscv/kernel/acpi.c:224:24: warning: incorrect type in argument 1 (different address spaces)
> arch/riscv/kernel/acpi.c:224:24:    expected void *addr
> arch/riscv/kernel/acpi.c:224:24:    got void [noderef] __iomem *map
> 
> Signed-off-by: Ben Dooks <ben.dooks at codethink.co.uk>

Thanks for taking a look at this.  It appears that some of the other 
architectures have the same issue.  Could you come up with a series that 
addresses the others as well?  You might need to get the ACPI folks 
involved; it's not really clear to me why __acpi_map_table() needs to 
return an __iomem *.


- Paul



More information about the linux-riscv mailing list