Skip to content

Commit c44f15c

Browse files
rddunlapvineetgarc
authored andcommitted
arc: iounmap() arg is volatile
Add 'volatile' to iounmap()'s argument to prevent build warnings. This make it the same as other major architectures. Placates these warnings: (12 such warnings) ../drivers/video/fbdev/riva/fbdev.c: In function 'rivafb_probe': ../drivers/video/fbdev/riva/fbdev.c:2067:42: error: passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type [-Werror=discarded-qualifiers] 2067 | iounmap(default_par->riva.PRAMIN); Fixes: 1162b07 ("ARC: I/O and DMA Mappings") Signed-off-by: Randy Dunlap <[email protected]> Cc: Vineet Gupta <[email protected]> Cc: [email protected] Cc: Arnd Bergmann <[email protected]> Signed-off-by: Vineet Gupta <[email protected]>
1 parent c8f8785 commit c44f15c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/arc/include/asm/io.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static inline void ioport_unmap(void __iomem *addr)
3232
{
3333
}
3434

35-
extern void iounmap(const void __iomem *addr);
35+
extern void iounmap(const volatile void __iomem *addr);
3636

3737
/*
3838
* io{read,write}{16,32}be() macros

arch/arc/mm/ioremap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size,
9494
EXPORT_SYMBOL(ioremap_prot);
9595

9696

97-
void iounmap(const void __iomem *addr)
97+
void iounmap(const volatile void __iomem *addr)
9898
{
9999
/* weird double cast to handle phys_addr_t > 32 bits */
100100
if (arc_uncached_addr_space((phys_addr_t)(u32)addr))

0 commit comments

Comments
 (0)