Skip to content

Commit 28c0299

Browse files
Vladimir IsaevVVIsaev
authored andcommitted
ARC: Fix pointer to integer cast warnings
For PAE case phys_addr_t does not match pointer size. So we need double-converstion there. Signed-off-by: Vladimir Isaev <isaev@synopsys.com>
1 parent f9ef053 commit 28c0299

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arc/mm/ioremap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void __iomem *ioremap(phys_addr_t paddr, unsigned long size)
8181
* The cast to u32 is fine as this region can only be inside 4GB
8282
*/
8383
if (arc_uncached_addr_space(paddr))
84-
return (void __iomem *)paddr;
84+
return (void __iomem *)(unsigned long __force)paddr;
8585

8686
return ioremap_prot_internal(paddr, size,
8787
pgprot_noncached(PAGE_KERNEL));
@@ -110,7 +110,7 @@ EXPORT_SYMBOL(ioremap_prot);
110110
void iounmap(const void __iomem *addr)
111111
{
112112
/* weird double cast to handle phys_addr_t > 32 bits */
113-
if (arc_uncached_addr_space((phys_addr_t)addr))
113+
if (arc_uncached_addr_space((unsigned long __force)addr))
114114
return;
115115

116116
vfree((void *)(PAGE_MASK & (unsigned long __force)addr));

0 commit comments

Comments
 (0)