Re: [PATCH] RISC-V: ACPI: fix two __iomem cast warnings
From: Paul Walmsley
Date: Thu Apr 02 2026 - 17:32:02 EST
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@xxxxxxxxxxxxxxx>
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