Skip to contentSkip to conversation

staging: ralink-gdma: ralink-gdma: change variable to a non-volatile

PATCH In review Lourdes Pedrajas 2 participants 2 messages Mar 12, 2020 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: ralink-gdma: ralink-gdma: change variable to a non-volatile

Change variable declaration volatile unsigned long chan_issued to unsigned long chan_issued

Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst

Issue found with checkpatch.pl

---
 drivers/staging/ralink-gdma/ralink-gdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/ralink-gdma/ralink-gdma.c +1 -1
index eabf1093328e..8d1b81f720fd 100644
@@ -122,7 +122,7 @@ struct gdma_dma_dev {
 	struct gdma_data *data;
 	void __iomem *base;
 	struct tasklet_struct task;
-	volatile unsigned long chan_issued;
+	unsigned long chan_issued;
 	atomic_t cnt;
 
 	struct gdma_dmaengine_chan chan[];
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 17 lines · Lourdes Pedrajas

Change variable declaration volatile unsigned long chan_issued to unsigned long chan_issued

Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst

Issue found with checkpatch.pl

---
 drivers/staging/ralink-gdma/ralink-gdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/ralink-gdma/ralink-gdma.c +0 -0
index eabf1093328e..8d1b81f720fd 100644

drivers/staging/ralink-gdma/ralink-gdma.c struct gdma_dma_dev { · line 125

Quoted 5 lines
drivers/staging/ralink-gdma/ralink-gdma.c +1 -1
@@ -122,7 +122,7 @@ struct gdma_dma_dev {
 	struct gdma_data *data;
 	void __iomem *base;
 	struct tasklet_struct task;
-	volatile unsigned long chan_issued;
+	unsigned long chan_issued;

Same comment here as on the other patch.

thanks,
greg k-h