]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: au88xx: Add fall-through annotations
authorTakashi Iwai <tiwai@suse.de>
Thu, 4 Oct 2018 18:04:38 +0000 (20:04 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 12 Oct 2018 07:31:34 +0000 (09:31 +0200)
As a preparatory patch for the upcoming -Wimplicit-fallthrough
compiler checks, add the "fall through" annotation in au88xx driver.

Although the usages in both both functions vortex_adbdma_setbuffers()
and vortex_wtdma_setbuffers() look a bit suspicious, we keep the
behavior as before, just to be safer.  If it were broken, we should
have already received bug reports.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/au88x0/au88x0_core.c

index 2e5b460a847c678c7af2b2945e34be906e91299d..96ece1a71cf157573ec01fec1acde2d24e784cf6 100644 (file)
@@ -1115,6 +1115,7 @@ vortex_adbdma_setbuffers(vortex_t * vortex, int adbdma,
                hwwrite(vortex->mmio,
                        VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0xc,
                        snd_pcm_sgbuf_get_addr(dma->substream, psize * 3));
+               /* fall through */
                /* 3 pages */
        case 3:
                dma->cfg0 |= 0x12000000;
@@ -1122,12 +1123,14 @@ vortex_adbdma_setbuffers(vortex_t * vortex, int adbdma,
                hwwrite(vortex->mmio,
                        VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0x8,
                        snd_pcm_sgbuf_get_addr(dma->substream, psize * 2));
+               /* fall through */
                /* 2 pages */
        case 2:
                dma->cfg0 |= 0x88000000 | 0x44000000 | 0x10000000 | (psize - 1);
                hwwrite(vortex->mmio,
                        VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0x4,
                        snd_pcm_sgbuf_get_addr(dma->substream, psize));
+               /* fall through */
                /* 1 page */
        case 1:
                dma->cfg0 |= 0x80000000 | 0x40000000 | ((psize - 1) << 0xc);
@@ -1390,17 +1393,20 @@ vortex_wtdma_setbuffers(vortex_t * vortex, int wtdma,
                dma->cfg1 |= 0x88000000 | 0x44000000 | 0x30000000 | (psize-1);
                hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0xc,
                        snd_pcm_sgbuf_get_addr(dma->substream, psize * 3));
+               /* fall through */
                /* 3 pages */
        case 3:
                dma->cfg0 |= 0x12000000;
                dma->cfg1 |= 0x80000000 | 0x40000000 | ((psize-1) << 0xc);
                hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4)  + 0x8,
                        snd_pcm_sgbuf_get_addr(dma->substream, psize * 2));
+               /* fall through */
                /* 2 pages */
        case 2:
                dma->cfg0 |= 0x88000000 | 0x44000000 | 0x10000000 | (psize-1);
                hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0x4,
                        snd_pcm_sgbuf_get_addr(dma->substream, psize));
+               /* fall through */
                /* 1 page */
        case 1:
                dma->cfg0 |= 0x80000000 | 0x40000000 | ((psize-1) << 0xc);