summaryrefslogtreecommitdiffstats
path: root/arch/parisc/mm/ioremap.c
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2023-08-10 03:55:47 +0200
committerHelge Deller <deller@gmx.de>2023-08-10 17:32:10 +0200
commitb873bde58578db2201b2f30ca708dcb0e35ff4b1 (patch)
treeb2cb5f313a8c682fcae5f99c3a2bbfc1b958c921 /arch/parisc/mm/ioremap.c
parentparisc: fault: Use C99 arrary initializers (diff)
downloadlinux-b873bde58578db2201b2f30ca708dcb0e35ff4b1.tar.xz
linux-b873bde58578db2201b2f30ca708dcb0e35ff4b1.zip
parisc: ioremap: Fix sparse warnings
Fix sparse warning: incorrect type in assignment (different base types) expected unsigned long [usertype] addr got void *addr Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to '')
-rw-r--r--arch/parisc/mm/ioremap.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/parisc/mm/ioremap.c b/arch/parisc/mm/ioremap.c
index 345ff0b66499..d7ee1f43d997 100644
--- a/arch/parisc/mm/ioremap.c
+++ b/arch/parisc/mm/ioremap.c
@@ -27,7 +27,7 @@
*/
void __iomem *ioremap(unsigned long phys_addr, unsigned long size)
{
- void __iomem *addr;
+ uintptr_t addr;
struct vm_struct *area;
unsigned long offset, last_addr;
pgprot_t pgprot;
@@ -79,10 +79,9 @@ void __iomem *ioremap(unsigned long phys_addr, unsigned long size)
if (!area)
return NULL;
- addr = (void __iomem *) area->addr;
- if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size,
- phys_addr, pgprot)) {
- vunmap(addr);
+ addr = (uintptr_t) area->addr;
+ if (ioremap_page_range(addr, addr + size, phys_addr, pgprot)) {
+ vunmap(area->addr);
return NULL;
}