diff options
author | Helge Deller <deller@gmx.de> | 2023-08-10 03:55:47 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2023-08-10 17:32:10 +0200 |
commit | b873bde58578db2201b2f30ca708dcb0e35ff4b1 (patch) | |
tree | b2cb5f313a8c682fcae5f99c3a2bbfc1b958c921 | |
parent | aa1bb8b6351a81b28b9e10ab3414c21ded7cf11d (diff) | |
download | lwn-b873bde58578db2201b2f30ca708dcb0e35ff4b1.tar.gz lwn-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>
-rw-r--r-- | arch/parisc/mm/ioremap.c | 9 |
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; } |