提交 8b168cdf 编写于 作者: R Randy Dunlap 提交者: Lipeng Sang

arc: iounmap() arg is volatile

stable inclusion
from stable-v5.10.153
commit a5275572995601d8f20277a81a0869b7276afd61
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I64YCA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a5275572995601d8f20277a81a0869b7276afd61

--------------------------------

[ Upstream commit c44f15c1 ]

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: 1162b070 ("ARC: I/O and DMA Mappings")
Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
Cc: Vineet Gupta <vgupta@kernel.org>
Cc: linux-snps-arc@lists.infradead.org
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: NVineet Gupta <vgupta@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NLipeng Sang <sanglipeng1@jd.com>
上级 03cb4128
...@@ -32,7 +32,7 @@ static inline void ioport_unmap(void __iomem *addr) ...@@ -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 * io{read,write}{16,32}be() macros
......
...@@ -93,7 +93,7 @@ void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size, ...@@ -93,7 +93,7 @@ void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size,
EXPORT_SYMBOL(ioremap_prot); 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 */ /* weird double cast to handle phys_addr_t > 32 bits */
if (arc_uncached_addr_space((phys_addr_t)(u32)addr)) if (arc_uncached_addr_space((phys_addr_t)(u32)addr))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册