@@ -88,10 +88,10 @@ static bool __init dt_is_stub(void)
}
/*
- * __acpi_map_table() will be called before page_init(), so early_ioremap()
- * or early_memremap() should be called here to for ACPI table mapping.
+ * __acpi_map_table() will be called before page_init(), so early_memremap()
+ * should be called here to for ACPI table mapping.
*/
-void __init __iomem *__acpi_map_table(unsigned long phys, unsigned long size)
+void __init *__acpi_map_table(unsigned long phys, unsigned long size)
{
if (!size)
return NULL;
@@ -34,7 +34,7 @@ u64 acpi_saved_sp;
struct acpi_madt_core_pic acpi_core_pic[MAX_CORE_PIC];
-void __init __iomem * __acpi_map_table(unsigned long phys, unsigned long size)
+void __init *__acpi_map_table(unsigned long phys, unsigned long size)
{
if (!phys || !size)
@@ -202,10 +202,10 @@ struct acpi_madt_rintc *acpi_cpu_get_madt_rintc(int cpu)
}
/*
- * __acpi_map_table() will be called before paging_init(), so early_ioremap()
- * or early_memremap() should be called here to for ACPI table mapping.
+ * __acpi_map_table() will be called before paging_init(), so early_memremap()
+ * should be called here to for ACPI table mapping.
*/
-void __init __iomem *__acpi_map_table(unsigned long phys, unsigned long size)
+void __init *__acpi_map_table(unsigned long phys, unsigned long size)
{
if (!size)
return NULL;
@@ -105,7 +105,7 @@ static u32 isa_irq_to_gsi[NR_IRQS_LEGACY] __read_mostly = {
* This is just a simple wrapper around early_memremap(),
* with sanity checks for phys == 0 and size == 0.
*/
-void __init __iomem *__acpi_map_table(unsigned long phys, unsigned long size)
+void __init *__acpi_map_table(unsigned long phys, unsigned long size)
{
if (!phys || !size)
@@ -334,7 +334,7 @@ void __iomem __ref
}
if (!acpi_permanent_mmap)
- return __acpi_map_table((unsigned long)phys, size);
+ return (void __iomem __force *)__acpi_map_table((unsigned long)phys, size);
mutex_lock(&acpi_ioremap_lock);
/* Check if there's a suitable mapping already. */
@@ -207,7 +207,7 @@ static inline int acpi_debugger_notify_command_complete(void)
(!entry) || (unsigned long)entry + sizeof(*entry) > end || \
((struct acpi_subtable_header *)entry)->length < sizeof(*entry))
-void __iomem *__acpi_map_table(unsigned long phys, unsigned long size);
+void *__acpi_map_table(unsigned long phys, unsigned long size);
void __acpi_unmap_table(void __iomem *map, unsigned long size);
int early_acpi_boot_init(void);
int acpi_boot_init (void);
All architectures use early_memremap() instead of early_ioremap(). Therefore, to solve the warning detected by sparse: ../arch/riscv/kernel/acpi.c:213:30: warning: incorrect type in return expression (different address spaces) ../arch/riscv/kernel/acpi.c:213:30: expected void [noderef] __iomem * ../arch/riscv/kernel/acpi.c:213:30: got void * ../arch/riscv/kernel/acpi.c:221:24: warning: incorrect type in argument 1 (different address spaces) ../arch/riscv/kernel/acpi.c:221:24: expected void *addr ../arch/riscv/kernel/acpi.c:221:24: got void [noderef] __iomem *map The __iomem attribute of __acpi_map_table() is removed. Signed-off-by: Yunhui Cui <cuiyunhui@bytedance.com> --- arch/arm64/kernel/acpi.c | 6 +++--- arch/loongarch/kernel/acpi.c | 2 +- arch/riscv/kernel/acpi.c | 6 +++--- arch/x86/kernel/acpi/boot.c | 2 +- drivers/acpi/osl.c | 2 +- include/linux/acpi.h | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-)