Commit b873bde5 authored by Helge Deller's avatar Helge Deller

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: default avatarHelge Deller <deller@gmx.de>
parent aa1bb8b6
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
*/ */
void __iomem *ioremap(unsigned long phys_addr, unsigned long size) void __iomem *ioremap(unsigned long phys_addr, unsigned long size)
{ {
void __iomem *addr; uintptr_t addr;
struct vm_struct *area; struct vm_struct *area;
unsigned long offset, last_addr; unsigned long offset, last_addr;
pgprot_t pgprot; pgprot_t pgprot;
...@@ -79,10 +79,9 @@ void __iomem *ioremap(unsigned long phys_addr, unsigned long size) ...@@ -79,10 +79,9 @@ void __iomem *ioremap(unsigned long phys_addr, unsigned long size)
if (!area) if (!area)
return NULL; return NULL;
addr = (void __iomem *) area->addr; addr = (uintptr_t) area->addr;
if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size, if (ioremap_page_range(addr, addr + size, phys_addr, pgprot)) {
phys_addr, pgprot)) { vunmap(area->addr);
vunmap(addr);
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment