hw/omap_dma, hw/omap_spi: Explicitly mark fallthroughs

Explicitly mark the fallthroughs as intentional in the code
pattern where we gradually increment an index before falling
into the code to read/write that array entry:
  case THINGY_3: idx++;
  case THINGY_2: idx++;
  case THINGY_1: idx++;
  case THINGY_0: return s->thingy[idx];

This makes static analysers happy.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Peter Maydell 2013-01-21 12:50:53 +00:00 committed by Blue Swirl
parent 139bd956ea
commit be688dfb8d
2 changed files with 36 additions and 0 deletions

View file

@ -1709,19 +1709,25 @@ static uint64_t omap_dma4_read(void *opaque, hwaddr addr,
case 0x14: /* DMA4_IRQSTATUS_L3 */
irqn ++;
/* fall through */
case 0x10: /* DMA4_IRQSTATUS_L2 */
irqn ++;
/* fall through */
case 0x0c: /* DMA4_IRQSTATUS_L1 */
irqn ++;
/* fall through */
case 0x08: /* DMA4_IRQSTATUS_L0 */
return s->irqstat[irqn];
case 0x24: /* DMA4_IRQENABLE_L3 */
irqn ++;
/* fall through */
case 0x20: /* DMA4_IRQENABLE_L2 */
irqn ++;
/* fall through */
case 0x1c: /* DMA4_IRQENABLE_L1 */
irqn ++;
/* fall through */
case 0x18: /* DMA4_IRQENABLE_L0 */
return s->irqen[irqn];
@ -1856,10 +1862,13 @@ static void omap_dma4_write(void *opaque, hwaddr addr,
switch (addr) {
case 0x14: /* DMA4_IRQSTATUS_L3 */
irqn ++;
/* fall through */
case 0x10: /* DMA4_IRQSTATUS_L2 */
irqn ++;
/* fall through */
case 0x0c: /* DMA4_IRQSTATUS_L1 */
irqn ++;
/* fall through */
case 0x08: /* DMA4_IRQSTATUS_L0 */
s->irqstat[irqn] &= ~value;
if (!s->irqstat[irqn])
@ -1868,10 +1877,13 @@ static void omap_dma4_write(void *opaque, hwaddr addr,
case 0x24: /* DMA4_IRQENABLE_L3 */
irqn ++;
/* fall through */
case 0x20: /* DMA4_IRQENABLE_L2 */
irqn ++;
/* fall through */
case 0x1c: /* DMA4_IRQENABLE_L1 */
irqn ++;
/* fall through */
case 0x18: /* DMA4_IRQENABLE_L0 */
s->irqen[irqn] = value;
return;