Skip to contentSkip to conversation

ste_dma40: make stedma40_chan_cfg const

PATCH In review Bhumika Goyal 3 participants 4 messages Aug 13, 2017 – Aug 21, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ste_dma40: make stedma40_chan_cfg const

Make these const as they are only used during a copy operation. Done using Coccinelle.

---
 drivers/dma/ste_dma40.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma/ste_dma40.c +2 -2
index c3052fb..f4fab41 100644
@@ -79,7 +79,7 @@
 };
 
 /* Default configuration for physcial memcpy */
-static struct stedma40_chan_cfg dma40_memcpy_conf_phy = {
+static const struct stedma40_chan_cfg dma40_memcpy_conf_phy = {
 	.mode = STEDMA40_MODE_PHYSICAL,
 	.dir = DMA_MEM_TO_MEM,
 
@@ -93,7 +93,7 @@
 };
 
 /* Default configuration for logical memcpy */
-static struct stedma40_chan_cfg dma40_memcpy_conf_log = {
+static const struct stedma40_chan_cfg dma40_memcpy_conf_log = {
 	.mode = STEDMA40_MODE_LOGICAL,
 	.dir = DMA_MEM_TO_MEM,
 
Signature · 1 line
1.9.1
#2 lore raw
In reply to Bhumika Goyal
Quoted 2 lines · Bhumika Goyal

Make these const as they are only used during a copy operation. Done using Coccinelle.

Pls make sure you use the right subsystem tags, hint, you cna check git log on that subsystem/file to find the right ones

Applied after fixing the tags, thanks

Signature · 1 line
~Vinod
#3 lore raw
Quoted 7 lines · Vinod Koul
Quoted 2 lines · Bhumika Goyal

Make these const as they are only used during a copy operation. Done using Coccinelle.

Pls make sure you use the right subsystem tags, hint, you cna check git log on that subsystem/file to find the right ones

Thanks for the note. I will be more careful next time.

Thanks,
Bhumika

Quoted 4 lines

Applied after fixing the tags, thanks

--
~Vinod