Skip to content

Commit

Permalink
arc: iounmap() arg is volatile
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
rddunlap authored and vineetgarc committed Oct 17, 2022
1 parent c8f8785 commit c44f15c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/arc/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static inline void ioport_unmap(void __iomem *addr)
{
}

extern void iounmap(const void __iomem *addr);
extern void iounmap(const volatile void __iomem *addr);

/*
* io{read,write}{16,32}be() macros
Expand Down
2 changes: 1 addition & 1 deletion arch/arc/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size,
EXPORT_SYMBOL(ioremap_prot);


void iounmap(const void __iomem *addr)
void iounmap(const volatile void __iomem *addr)
{
/* weird double cast to handle phys_addr_t > 32 bits */
if (arc_uncached_addr_space((phys_addr_t)(u32)addr))
Expand Down

0 comments on commit c44f15c

Please sign in to comment.