ALSA: Fix fall-through annotations
Subsystems (2)
cover ALSA: Fix fall-through annotations
Hi,
here is some trivial patches to add / fix the fall-through annotations. The patchset for ASoC will follow later.
Takashi
===
Takashi Iwai (5):
ALSA: memalloc: Add fall-through annotation
ALSA: caiaq: Add fall-through annotation
ALSA: seq: oss: Use the standard fall-through annotation
ALSA: opti92xx-ad1848: Use the standard fall-through annotation
ALSA: au88xx: Add fall-through annotations
sound/core/memalloc.c | 1 + sound/core/seq/oss/seq_oss_timer.c | 2 +- sound/isa/opti9xx/opti92x-ad1848.c | 6 ++++-- sound/pci/au88x0/au88x0_core.c | 6 ++++++ sound/usb/caiaq/device.c | 1 + 5 files changed, 13 insertions(+), 3 deletions(-)
Signature · 1 line
2.18.0
PATCH 1/5 ALSA: memalloc: Add fall-through annotation
As a preparatory patch for the upcoming -Wimplicit-fallthrough compiler checks, add the "fall through" annotation in snd_dma_alloc_pages(). Note that this seems necessary to be put exactly before the next label, so it's outside the ifdef block.
--- sound/core/memalloc.c | 1 + 1 file changed, 1 insertion(+)
sound/core/memalloc.c +1 -0
@@ -203,6 +203,7 @@ int snd_dma_alloc_pages(int type, struct device *device, size_t size,*/ dmab->dev.type =SNDRV_DMA_TYPE_DEV ;#endif /* CONFIG_GENERIC_ALLOCATOR */ +/* fall through */ case SNDRV_DMA_TYPE_DEV :case SNDRV_DMA_TYPE_DEV_UC :snd_malloc_dev_pages (dmab, size);
Signature · 1 line
2.18.0
PATCH 2/5 ALSA: caiaq: Add fall-through annotation
In reply to Takashi IwaiAs a preparatory patch for the upcoming -Wimplicit-fallthrough compiler checks, add the "fall through" annotation in caiaq driver. Note that this seems necessary to be put exactly before the next label, so it's outside the ifdef block.
--- sound/usb/caiaq/device.c | 1 + 1 file changed, 1 insertion(+)
sound/usb/caiaq/device.c +1 -0
@@ -200,6 +200,7 @@ static void usb_ep1_command_reply_dispatch (struct urb* urb)break ; }#ifdef CONFIG_SND_USB_CAIAQ_INPUT +/* fall through */ case EP1_CMD_READ_ERP :case EP1_CMD_READ_ANALOG :snd_usb_caiaq_input_dispatch (cdev, buf, urb->actual_length);
Signature · 1 line
2.18.0
PATCH 3/5 ALSA: seq: oss: Use the standard fall-through annotation
In reply to Takashi IwaiAs a preparatory patch for the upcoming -Wimplicit-fallthrough compiler checks, replace with the standard "fall through" annotation. Unfortunately gcc doesn't understand a chattier text.
--- sound/core/seq/oss/seq_oss_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/seq/oss/seq_oss_timer.c +1 -1
@@ -92,7 +92,7 @@ snd_seq_oss_process_timer_event(struct seq_oss_timer *rec, union evrec *ev)case TMR_WAIT_REL : parm += rec->cur_tick; rec->realtime =0 ; -/* fall through and continue to next */ +/* fall through */ case TMR_WAIT_ABS :if (parm ==0 ) { rec->realtime =1 ;
Signature · 1 line
2.18.0
PATCH 4/5 ALSA: opti92xx-ad1848: Use the standard fall-through annotation
In reply to Takashi IwaiAs a preparatory patch for the upcoming -Wimplicit-fallthrough compiler checks, replace with the standard "fall through" annotation at the right places. They have to be put right before the next labels.
--- sound/isa/opti9xx/opti92x-ad1848.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
sound/isa/opti9xx/opti92x-ad1848.c +4 -2
@@ -389,7 +389,8 @@ static int snd_opti9xx_configure(struct snd_opti9xx *chip,case OPTi9XX_HW_82C931:/* disable 3D sound (set GPIO1 as output, low) */ snd_opti9xx_write_mask (chip,OPTi9XX_MC_REG (20 ),0x04 ,0x0c ); -case OPTi9XX_HW_82C933:/* FALL THROUGH */ +/* fall through */ +case OPTi9XX_HW_82C933:/* * The BTC 1817DW has QS1000 wavetable which is connected * to the serial digital input of the OPTI931.
@@ -400,7 +401,8 @@ static int snd_opti9xx_configure(struct snd_opti9xx *chip,* or digital input signal. */ snd_opti9xx_write_mask (chip,OPTi9XX_MC_REG (26 ),0x01 ,0x01 ); -case OPTi9XX_HW_82C930:/* FALL THROUGH */ +/* fall through */ +case OPTi9XX_HW_82C930:snd_opti9xx_write_mask (chip,OPTi9XX_MC_REG (6 ),0x02 ,0x03 );snd_opti9xx_write_mask (chip,OPTi9XX_MC_REG (3 ),0x00 ,0xff ); snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(4), 0x10 |
Signature · 1 line
2.18.0
PATCH 5/5 ALSA: au88xx: Add fall-through annotations
In reply to Takashi IwaiAs 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.
--- sound/pci/au88x0/au88x0_core.c | 6 ++++++ 1 file changed, 6 insertions(+)
sound/pci/au88x0/au88x0_core.c +6 -0
@@ -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 );
Signature · 1 line
2.18.0