Skip to contentSkip to conversation

dmaengine: fsldma: Mark expected switch fall-through

PATCH Applied Gustavo A. R. Silva 3 participants 3 messages Aug 12, 2019 – Aug 13, 2019

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

PATCH 1/1 dmaengine: fsldma: Mark expected switch fall-through

Mark switch cases where we are expecting to fall through.

Fix the following warning (Building: powerpc-ppa8548_defconfig powerpc):

drivers/dma/fsldma.c: In function ‘fsl_dma_chan_probe’:
drivers/dma/fsldma.c:1165:26: warning: this statement may fall through [-Wimplicit-fallthrough=]
chan->toggle_ext_pause = fsl_chan_toggle_ext_pause; ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/dma/fsldma.c:1166:2: note: here
case FSL_DMA_IP_83XX:
^~~~

---
 drivers/dma/fsldma.c | 1 +
 1 file changed, 1 insertion(+)
drivers/dma/fsldma.c +1 -0
index 23e0a356f167..ad72b3f42ffa 100644
@@ -1163,6 +1163,7 @@ static int fsl_dma_chan_probe(struct fsldma_device *fdev,
 	switch (chan->feature & FSL_DMA_IP_MASK) {
 	case FSL_DMA_IP_85XX:
 		chan->toggle_ext_pause = fsl_chan_toggle_ext_pause;
+		/* Fall through */
 	case FSL_DMA_IP_83XX:
 		chan->toggle_ext_start = fsl_chan_toggle_ext_start;
 		chan->set_src_loop_size = fsl_chan_set_src_loop_size;
Signature · 1 line
2.22.0
Acked-by on v1 1/1
#1 lore raw
Quoted 18 lines

-----Original Message-----
From: Gustavo A. R. Silva <[email protected]>
Sent: Sunday, August 11, 2019 7:22 PM
To: Leo Li <[email protected]>; Zhang Wei <[email protected]>; Vinod Koul <[email protected]>; Dan Williams <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]; Gustavo A. R. Silva <[email protected]>
Subject: [PATCH] dmaengine: fsldma: Mark expected switch fall-through

Mark switch cases where we are expecting to fall through.

Fix the following warning (Building: powerpc-ppa8548_defconfig powerpc):

drivers/dma/fsldma.c: In function ‘fsl_dma_chan_probe’:
drivers/dma/fsldma.c:1165:26: warning: this statement may fall through [- Wimplicit-fallthrough=]

Quoted 8 lines
   chan->toggle_ext_pause = fsl_chan_toggle_ext_pause;
   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/dma/fsldma.c:1166:2: note: here
case FSL_DMA_IP_83XX:
^~~~

Quoted 19 lines
---
 drivers/dma/fsldma.c | 1 +
 1 file changed, 1 insertion(+)
drivers/dma/fsldma.c index renamed from drivers/dma/fsldma.c +0 -0

23e0a356f167..ad72b3f42ffa 100644

drivers/dma/fsldma.c +1 -0
@@ -1163,6 +1163,7 @@ static int fsl_dma_chan_probe(struct
 fsldma_device *fdev,
 	switch (chan->feature & FSL_DMA_IP_MASK) {
 	case FSL_DMA_IP_85XX:
 		chan->toggle_ext_pause = fsl_chan_toggle_ext_pause;
+		/* Fall through */
 	case FSL_DMA_IP_83XX:
 		chan->toggle_ext_start = fsl_chan_toggle_ext_start;

chan->set_src_loop_size = fsl_chan_set_src_loop_size;
--
2.22.0

maintainer Applied
#2 lore raw
In reply to Gustavo A. R. Silva
Quoted 11 lines · Gustavo A. R. Silva

Mark switch cases where we are expecting to fall through.

Fix the following warning (Building: powerpc-ppa8548_defconfig powerpc):

drivers/dma/fsldma.c: In function ‘fsl_dma_chan_probe’:
drivers/dma/fsldma.c:1165:26: warning: this statement may fall through [-Wimplicit-fallthrough=]

   chan->toggle_ext_pause = fsl_chan_toggle_ext_pause;
   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/dma/fsldma.c:1166:2: note: here
case FSL_DMA_IP_83XX:
^~~~

Applied, thanks

Signature · 1 line
~Vinod