Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1672812 > unrolled thread

[PATCH 1/7] drm/tilcdc: don't use volatile with iowrite64

Started byLogan Gunthorpe <logang@deltatee.com>
First post2017-06-22 18:50 +0200
Last post2017-06-26 11:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/7] drm/tilcdc: don't use volatile with iowrite64 Logan Gunthorpe <logang@deltatee.com> - 2017-06-22 18:50 +0200
    Re: [PATCH 1/7] drm/tilcdc: don't use volatile with iowrite64 Jyri Sarha <jsarha@ti.com> - 2017-06-26 11:00 +0200

#1672812 — [PATCH 1/7] drm/tilcdc: don't use volatile with iowrite64

FromLogan Gunthorpe <logang@deltatee.com>
Date2017-06-22 18:50 +0200
Subject[PATCH 1/7] drm/tilcdc: don't use volatile with iowrite64
Message-ID<tVdsS-7hT-15@gated-at.bofh.it>
This is a prep patch for adding a universal iowrite64.

The patch is to prevent compiler warnings when we add iowrite64 that
would occur because there is an unnecessary volatile in this driver.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Cc: Jyri Sarha <jsarha@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: David Airlie <airlied@linux.ie>
---
 drivers/gpu/drm/tilcdc/tilcdc_regs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_regs.h b/drivers/gpu/drm/tilcdc/tilcdc_regs.h
index 9d528c0a67a4..e9ce725698a9 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_regs.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_regs.h
@@ -131,14 +131,14 @@ 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 = dev->dev_private;
-	volatile void __iomem *addr = priv->mmio + reg;
+	void __iomem *addr = priv->mmio + reg;
 
 #ifdef iowrite64
 	iowrite64(data, addr);
 #else
 	__iowmb();
 	/* This compiles to strd (=64-bit write) on ARM7 */
-	*(volatile u64 __force *)addr = __cpu_to_le64(data);
+	*(u64 __force *)addr = __cpu_to_le64(data);
 #endif
 }
 
-- 
2.11.0

[toc] | [next] | [standalone]


#1674535

FromJyri Sarha <jsarha@ti.com>
Date2017-06-26 11:00 +0200
Message-ID<tWy2d-7H-5@gated-at.bofh.it>
In reply to#1672812
On 06/22/17 19:48, Logan Gunthorpe wrote:
> This is a prep patch for adding a universal iowrite64.
> 
> The patch is to prevent compiler warnings when we add iowrite64 that
> would occur because there is an unnecessary volatile in this driver.
> 
> Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
> Cc: Jyri Sarha <jsarha@ti.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: David Airlie <airlied@linux.ie>

Acked-by: Jyri Sarha <jsarha@ti.com>

> ---
>  drivers/gpu/drm/tilcdc/tilcdc_regs.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_regs.h b/drivers/gpu/drm/tilcdc/tilcdc_regs.h
> index 9d528c0a67a4..e9ce725698a9 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_regs.h
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_regs.h
> @@ -131,14 +131,14 @@ 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 = dev->dev_private;
> -	volatile void __iomem *addr = priv->mmio + reg;
> +	void __iomem *addr = priv->mmio + reg;
>  
>  #ifdef iowrite64
>  	iowrite64(data, addr);
>  #else
>  	__iowmb();
>  	/* This compiles to strd (=64-bit write) on ARM7 */
> -	*(volatile u64 __force *)addr = __cpu_to_le64(data);
> +	*(u64 __force *)addr = __cpu_to_le64(data);
>  #endif
>  }
>  
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web