Commit 3da6bd94 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva

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: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
parent e7c0c9f6
...@@ -388,17 +388,15 @@ void omap_set_dma_src_burst_mode(int lch, enum omap_dma_burst_mode burst_mode) ...@@ -388,17 +388,15 @@ void omap_set_dma_src_burst_mode(int lch, enum omap_dma_burst_mode burst_mode)
/* /*
* not supported by current hardware on OMAP1 * not supported by current hardware on OMAP1
* w |= (0x03 << 7); * w |= (0x03 << 7);
* fall through
*/ */
/* fall through */
case OMAP_DMA_DATA_BURST_16: case OMAP_DMA_DATA_BURST_16:
if (dma_omap2plus()) { if (dma_omap2plus()) {
burst = 0x3; burst = 0x3;
break; break;
} }
/* /* OMAP1 don't support burst 16 */
* OMAP1 don't support burst 16 /* fall through */
* fall through
*/
default: default:
BUG(); BUG();
} }
...@@ -474,10 +472,8 @@ void omap_set_dma_dest_burst_mode(int lch, enum omap_dma_burst_mode burst_mode) ...@@ -474,10 +472,8 @@ void omap_set_dma_dest_burst_mode(int lch, enum omap_dma_burst_mode burst_mode)
burst = 0x3; burst = 0x3;
break; break;
} }
/* /* OMAP1 don't support burst 16 */
* OMAP1 don't support burst 16 /* fall through */
* fall through
*/
default: default:
printk(KERN_ERR "Invalid DMA burst mode\n"); printk(KERN_ERR "Invalid DMA burst mode\n");
BUG(); BUG();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment