openrisc: io: Define iounmap argument as volatile
Stafford Horne
maintainerPATCH 1/1 openrisc: io: Define iounmap argument as volatile
When OpenRISC enables PCI it allows for more drivers to be compiled resulting in exposing the following with -Werror.
drivers/video/fbdev/riva/fbdev.c: In function 'rivafb_probe':
drivers/video/fbdev/riva/fbdev.c:2062:42: error:
passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type
drivers/video/fbdev/nvidia/nvidia.c: In function 'nvidiafb_probe':
drivers/video/fbdev/nvidia/nvidia.c:1414:20: error:
passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type
drivers/scsi/aic7xxx/aic7xxx_osm.c: In function 'ahc_platform_free':
drivers/scsi/aic7xxx/aic7xxx_osm.c:1231:41: error:
passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type
Most architectures define the iounmap argument to be volatile. To fix this issue we do the same for OpenRISC. This patch must go before PCI is enabled on OpenRISC to avoid any compile failures.
--- arch/openrisc/include/asm/io.h | 2 +- arch/openrisc/mm/ioremap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/openrisc/include/asm/io.h +1 -1
@@ -31,7 +31,7 @@void __iomem *ioremap (phys_addr_t offset,unsigned long size);#define iounmap iounmap -extern void iounmap (void __iomem *addr); +extern void iounmap (volatile void __iomem *addr);#include <asm-generic/io.h>
arch/openrisc/mm/ioremap.c +1 -1
@@ -77,7 +77,7 @@ void __iomem *__ref ioremap(phys_addr_t addr, unsigned long size) }EXPORT_SYMBOL (ioremap); -void iounmap (void __iomem *addr) +void iounmap (volatile void __iomem *addr) {/* If the page is from the fixmap pool then we just clear out * the fixmap mapping.
Signature · 1 line
2.37.1
Quoted 15 lines · Stafford Horne
When OpenRISC enables PCI it allows for more drivers to be compiled resulting in exposing the following with -Werror.
drivers/video/fbdev/riva/fbdev.c: In function 'rivafb_probe':
drivers/video/fbdev/riva/fbdev.c:2062:42: error:
passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type
drivers/video/fbdev/nvidia/nvidia.c: In function 'nvidiafb_probe':
drivers/video/fbdev/nvidia/nvidia.c:1414:20: error:
passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type
drivers/scsi/aic7xxx/aic7xxx_osm.c: In function 'ahc_platform_free':
drivers/scsi/aic7xxx/aic7xxx_osm.c:1231:41: error:
passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type
Quoted 7 lines
Most architectures define the iounmap argument to be volatile. To fix this issue we do the same for OpenRISC. This patch must go before PCI is enabled on OpenRISC to avoid any compile failures.
Reported-by Guenter Roeck <[email protected]>Signed-off-by Stafford Horne <[email protected]>
Quoted 34 lines
--- arch/openrisc/include/asm/io.h | 2 +- arch/openrisc/mm/ioremap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)arch/openrisc/include/asm/io.h +1
-1@@ -31,7 +31,7 @@void __iomem *ioremap (phys_addr_t offset,unsigned long size);#define iounmap iounmap -extern void iounmap (void __iomem *addr); +extern void iounmap (volatile void __iomem *addr);#include <asm-generic/io.h> arch/openrisc/mm/ioremap.c +1
-1@@ -77,7 +77,7 @@ void __iomem *__ref ioremap(phys_addr_t addr, unsigned long size) }EXPORT_SYMBOL (ioremap); -void iounmap (void __iomem *addr) +void iounmap (volatile void __iomem *addr) {/* If the page is from the fixmap pool then we just clear out * the fixmap mapping. Signature · 1 line
2.37.1