Skip to content

Commit 0c0d1ec

Browse files
GustavoARSilvatmlind
authored andcommitted
ARM: OMAP: dma: Mark expected switch fall-throughs
Mark switch cases where we are expecting to fall through. This patch fixes the following warnings: arch/arm/plat-omap/dma.c: In function 'omap_set_dma_src_burst_mode': arch/arm/plat-omap/dma.c:384:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (dma_omap2plus()) { ^ arch/arm/plat-omap/dma.c:393:2: note: here case OMAP_DMA_DATA_BURST_16: ^~~~ arch/arm/plat-omap/dma.c:394:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (dma_omap2plus()) { ^ arch/arm/plat-omap/dma.c:402:2: note: here default: ^~~~~~~ arch/arm/plat-omap/dma.c: In function 'omap_set_dma_dest_burst_mode': arch/arm/plat-omap/dma.c:473:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (dma_omap2plus()) { ^ arch/arm/plat-omap/dma.c:481:2: note: here default: ^~~~~~~ Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent 50e4b5c commit 0c0d1ec

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

arch/arm/plat-omap/dma.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -388,17 +388,15 @@ void omap_set_dma_src_burst_mode(int lch, enum omap_dma_burst_mode burst_mode)
388388
/*
389389
* not supported by current hardware on OMAP1
390390
* w |= (0x03 << 7);
391-
* fall through
392391
*/
392+
/* fall through */
393393
case OMAP_DMA_DATA_BURST_16:
394394
if (dma_omap2plus()) {
395395
burst = 0x3;
396396
break;
397397
}
398-
/*
399-
* OMAP1 don't support burst 16
400-
* fall through
401-
*/
398+
/* OMAP1 don't support burst 16 */
399+
/* fall through */
402400
default:
403401
BUG();
404402
}
@@ -474,10 +472,8 @@ void omap_set_dma_dest_burst_mode(int lch, enum omap_dma_burst_mode burst_mode)
474472
burst = 0x3;
475473
break;
476474
}
477-
/*
478-
* OMAP1 don't support burst 16
479-
* fall through
480-
*/
475+
/* OMAP1 don't support burst 16 */
476+
/* fall through */
481477
default:
482478
printk(KERN_ERR "Invalid DMA burst mode\n");
483479
BUG();

0 commit comments

Comments
 (0)