From: Ben Dooks <ben.dooks@codethink.co.uk>
To: linux-riscv@lists.infradead.org, palmer@dabbelt.com, pjw@kernel.org
Cc: linux-kernel@vger.kernel.org, alex@ghiti.fr,
Ben Dooks <ben.dooks@codethink.co.uk>
Subject: [PATCH] RISC-V: ACPI: fix two __iomem cast warnings
Date: Wed, 11 Mar 2026 10:22:17 +0000 [thread overview]
Message-ID: <20260311102217.409376-1-ben.dooks@codethink.co.uk> (raw)
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@codethink.co.uk>
---
arch/riscv/kernel/acpi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/kernel/acpi.c b/arch/riscv/kernel/acpi.c
index 71698ee11621..0d52942f94d5 100644
--- a/arch/riscv/kernel/acpi.c
+++ b/arch/riscv/kernel/acpi.c
@@ -213,7 +213,7 @@ void __init __iomem *__acpi_map_table(unsigned long phys, unsigned long size)
if (!size)
return NULL;
- return early_memremap(phys, size);
+ return (void __iomem *)early_memremap(phys, size);
}
void __init __acpi_unmap_table(void __iomem *map, unsigned long size)
@@ -221,7 +221,7 @@ void __init __acpi_unmap_table(void __iomem *map, unsigned long size)
if (!map || !size)
return;
- early_memunmap(map, size);
+ early_memunmap((void __force *)map, size);
}
void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
--
2.37.2.352.g3c44437643
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2026-03-11 11:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 10:22 Ben Dooks [this message]
2026-04-02 21:31 ` [PATCH] RISC-V: ACPI: fix two __iomem cast warnings Paul Walmsley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260311102217.409376-1-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=alex@ghiti.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox