diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-10-04 14:04:38 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-10-12 03:31:34 -0400 |
commit | 68da4fa51af4ea9d10099e48351b3cdaae7b1d23 (patch) | |
tree | 21747882047c772b199605f52b174950795ef7db /sound/pci/au88x0 | |
parent | 74ce5a46bb7b0298dc0be11bae944fca5d1f18a7 (diff) |
ALSA: au88xx: Add fall-through annotations
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>
Diffstat (limited to 'sound/pci/au88x0')
-rw-r--r-- | sound/pci/au88x0/au88x0_core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c index 2e5b460a847c..96ece1a71cf1 100644 --- a/sound/pci/au88x0/au88x0_core.c +++ b/sound/pci/au88x0/au88x0_core.c | |||
@@ -1115,6 +1115,7 @@ vortex_adbdma_setbuffers(vortex_t * vortex, int adbdma, | |||
1115 | hwwrite(vortex->mmio, | 1115 | hwwrite(vortex->mmio, |
1116 | VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0xc, | 1116 | VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0xc, |
1117 | snd_pcm_sgbuf_get_addr(dma->substream, psize * 3)); | 1117 | snd_pcm_sgbuf_get_addr(dma->substream, psize * 3)); |
1118 | /* fall through */ | ||
1118 | /* 3 pages */ | 1119 | /* 3 pages */ |
1119 | case 3: | 1120 | case 3: |
1120 | dma->cfg0 |= 0x12000000; | 1121 | dma->cfg0 |= 0x12000000; |
@@ -1122,12 +1123,14 @@ vortex_adbdma_setbuffers(vortex_t * vortex, int adbdma, | |||
1122 | hwwrite(vortex->mmio, | 1123 | hwwrite(vortex->mmio, |
1123 | VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0x8, | 1124 | VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0x8, |
1124 | snd_pcm_sgbuf_get_addr(dma->substream, psize * 2)); | 1125 | snd_pcm_sgbuf_get_addr(dma->substream, psize * 2)); |
1126 | /* fall through */ | ||
1125 | /* 2 pages */ | 1127 | /* 2 pages */ |
1126 | case 2: | 1128 | case 2: |
1127 | dma->cfg0 |= 0x88000000 | 0x44000000 | 0x10000000 | (psize - 1); | 1129 | dma->cfg0 |= 0x88000000 | 0x44000000 | 0x10000000 | (psize - 1); |
1128 | hwwrite(vortex->mmio, | 1130 | hwwrite(vortex->mmio, |
1129 | VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0x4, | 1131 | VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0x4, |
1130 | snd_pcm_sgbuf_get_addr(dma->substream, psize)); | 1132 | snd_pcm_sgbuf_get_addr(dma->substream, psize)); |
1133 | /* fall through */ | ||
1131 | /* 1 page */ | 1134 | /* 1 page */ |
1132 | case 1: | 1135 | case 1: |
1133 | dma->cfg0 |= 0x80000000 | 0x40000000 | ((psize - 1) << 0xc); | 1136 | dma->cfg0 |= 0x80000000 | 0x40000000 | ((psize - 1) << 0xc); |
@@ -1390,17 +1393,20 @@ vortex_wtdma_setbuffers(vortex_t * vortex, int wtdma, | |||
1390 | dma->cfg1 |= 0x88000000 | 0x44000000 | 0x30000000 | (psize-1); | 1393 | dma->cfg1 |= 0x88000000 | 0x44000000 | 0x30000000 | (psize-1); |
1391 | hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0xc, | 1394 | hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0xc, |
1392 | snd_pcm_sgbuf_get_addr(dma->substream, psize * 3)); | 1395 | snd_pcm_sgbuf_get_addr(dma->substream, psize * 3)); |
1396 | /* fall through */ | ||
1393 | /* 3 pages */ | 1397 | /* 3 pages */ |
1394 | case 3: | 1398 | case 3: |
1395 | dma->cfg0 |= 0x12000000; | 1399 | dma->cfg0 |= 0x12000000; |
1396 | dma->cfg1 |= 0x80000000 | 0x40000000 | ((psize-1) << 0xc); | 1400 | dma->cfg1 |= 0x80000000 | 0x40000000 | ((psize-1) << 0xc); |
1397 | hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0x8, | 1401 | hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0x8, |
1398 | snd_pcm_sgbuf_get_addr(dma->substream, psize * 2)); | 1402 | snd_pcm_sgbuf_get_addr(dma->substream, psize * 2)); |
1403 | /* fall through */ | ||
1399 | /* 2 pages */ | 1404 | /* 2 pages */ |
1400 | case 2: | 1405 | case 2: |
1401 | dma->cfg0 |= 0x88000000 | 0x44000000 | 0x10000000 | (psize-1); | 1406 | dma->cfg0 |= 0x88000000 | 0x44000000 | 0x10000000 | (psize-1); |
1402 | hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0x4, | 1407 | hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0x4, |
1403 | snd_pcm_sgbuf_get_addr(dma->substream, psize)); | 1408 | snd_pcm_sgbuf_get_addr(dma->substream, psize)); |
1409 | /* fall through */ | ||
1404 | /* 1 page */ | 1410 | /* 1 page */ |
1405 | case 1: | 1411 | case 1: |
1406 | dma->cfg0 |= 0x80000000 | 0x40000000 | ((psize-1) << 0xc); | 1412 | dma->cfg0 |= 0x80000000 | 0x40000000 | ((psize-1) << 0xc); |