dmaengine: imx-dma: Mark expected switch fall-through
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Mon, 29 Jul 2019 22:52:21 +0000 (17:52 -0500)
committerVinod Koul <vkoul@kernel.org>
Wed, 31 Jul 2019 15:19:04 +0000 (20:49 +0530)
Mark switch cases where we are expecting to fall through.

This patch fixes the following warning (Building: arm):

drivers/dma/imx-dma.c: In function ‘imxdma_xfer_desc’:
drivers/dma/imx-dma.c:542:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (slot == IMX_DMA_2D_SLOT_A) {
      ^
drivers/dma/imx-dma.c:559:2: note: here
  case IMXDMA_DESC_MEMCPY:
  ^~~~

Notice that, in this particular case, the code comment is
modified in accordance with what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Link: https://lore.kernel.org/r/20190729225221.GA24269@embeddedor
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/imx-dma.c

index 00a089e24150ac235877702586e049a48c2e5a2d..5c0fb3134825f56ce02af12738eabcbdbfcbbacf 100644 (file)
@@ -556,6 +556,7 @@ static int imxdma_xfer_desc(struct imxdma_desc *d)
                 * We fall-through here intentionally, since a 2D transfer is
                 * similar to MEMCPY just adding the 2D slot configuration.
                 */
+               /* Fall through */
        case IMXDMA_DESC_MEMCPY:
                imx_dmav1_writel(imxdma, d->src, DMA_SAR(imxdmac->channel));
                imx_dmav1_writel(imxdma, d->dest, DMA_DAR(imxdmac->channel));