From: Ville Syrjälä <[email protected]>

The address is passed to iowrite64() when the architecture provides
a native one. On some architectures (eg. alpha and parisc) that
takes a plain void __iomem *, so passing a volatile qualified
pointer discards the qualifier. This triggers -Wdiscarded-qualifiers
from gcc and a "different modifiers" warning from sparse. It is not
visible on ARM or arm64, where iowrite64() takes a volatile pointer.

The volatile on the pointer variable is not needed. The fallback
path already uses an explicit volatile cast for the actual access.

Cc: Jyri Sarha <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/tilcdc/tilcdc_regs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_regs.h 
b/drivers/gpu/drm/tilcdc/tilcdc_regs.h
index 55fe598fe770..23746b134c42 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_regs.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_regs.h
@@ -120,7 +120,7 @@ static inline void tilcdc_write(struct drm_device *dev, u32 
reg, u32 data)
 static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data)
 {
        struct tilcdc_drm_private *priv = ddev_to_tilcdc_priv(dev);
-       volatile void __iomem *addr = priv->mmio + reg;
+       void __iomem *addr = priv->mmio + reg;
 
 #if defined(iowrite64) && !defined(iowrite64_is_nonatomic)
        iowrite64(data, addr);
-- 
2.56.0

Reply via email to