ALSA: Use fallthrough pseudo-keyword
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20200708203236.GA5112@embeddedor Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:

committed by
Takashi Iwai

parent
a0b224b90b
commit
c0dbbdad4e
@@ -158,7 +158,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 */
|
||||
fallthrough;
|
||||
case SNDRV_DMA_TYPE_DEV:
|
||||
case SNDRV_DMA_TYPE_DEV_UC:
|
||||
snd_malloc_dev_pages(dmab, size);
|
||||
|
@@ -2851,7 +2851,7 @@ static int snd_pcm_oss_mmap(struct file *file, struct vm_area_struct *area)
|
||||
substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
|
||||
if (substream)
|
||||
break;
|
||||
/* Fall through */
|
||||
fallthrough;
|
||||
case VM_READ:
|
||||
substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
|
||||
break;
|
||||
|
@@ -357,7 +357,7 @@ snd_pcm_format_t snd_pcm_plug_slave_format(snd_pcm_format_t format,
|
||||
if (snd_mask_test(format_mask, (__force int)format1))
|
||||
return format1;
|
||||
}
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
default:
|
||||
return (__force snd_pcm_format_t)-EINVAL;
|
||||
}
|
||||
|
@@ -1903,7 +1903,7 @@ static int snd_pcm_prepare(struct snd_pcm_substream *substream,
|
||||
switch (substream->runtime->status->state) {
|
||||
case SNDRV_PCM_STATE_PAUSED:
|
||||
snd_pcm_pause(substream, false);
|
||||
/* fallthru */
|
||||
fallthrough;
|
||||
case SNDRV_PCM_STATE_SUSPENDED:
|
||||
snd_pcm_stop(substream, SNDRV_PCM_STATE_SETUP);
|
||||
break;
|
||||
@@ -2811,7 +2811,7 @@ static int do_pcm_hwsync(struct snd_pcm_substream *substream)
|
||||
case SNDRV_PCM_STATE_DRAINING:
|
||||
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
|
||||
return -EBADFD;
|
||||
/* Fall through */
|
||||
fallthrough;
|
||||
case SNDRV_PCM_STATE_RUNNING:
|
||||
return snd_pcm_update_hw_ptr(substream);
|
||||
case SNDRV_PCM_STATE_PREPARED:
|
||||
@@ -3814,7 +3814,7 @@ static int snd_pcm_mmap(struct file *file, struct vm_area_struct *area)
|
||||
case SNDRV_PCM_MMAP_OFFSET_STATUS_OLD:
|
||||
if (pcm_file->no_compat_mmap || !IS_ENABLED(CONFIG_64BIT))
|
||||
return -ENXIO;
|
||||
/* fallthrough */
|
||||
fallthrough;
|
||||
case SNDRV_PCM_MMAP_OFFSET_STATUS_NEW:
|
||||
if (!pcm_status_mmap_allowed(pcm_file))
|
||||
return -ENXIO;
|
||||
@@ -3822,7 +3822,7 @@ static int snd_pcm_mmap(struct file *file, struct vm_area_struct *area)
|
||||
case SNDRV_PCM_MMAP_OFFSET_CONTROL_OLD:
|
||||
if (pcm_file->no_compat_mmap || !IS_ENABLED(CONFIG_64BIT))
|
||||
return -ENXIO;
|
||||
/* fallthrough */
|
||||
fallthrough;
|
||||
case SNDRV_PCM_MMAP_OFFSET_CONTROL_NEW:
|
||||
if (!pcm_control_mmap_allowed(pcm_file))
|
||||
return -ENXIO;
|
||||
|
@@ -79,7 +79,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 */
|
||||
fallthrough;
|
||||
case TMR_WAIT_ABS:
|
||||
if (parm == 0) {
|
||||
rec->realtime = 1;
|
||||
|
@@ -309,7 +309,7 @@ do_control(const struct snd_midi_op *ops, void *drv,
|
||||
break;
|
||||
case MIDI_CTL_MSB_DATA_ENTRY:
|
||||
chan->control[MIDI_CTL_LSB_DATA_ENTRY] = 0;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case MIDI_CTL_LSB_DATA_ENTRY:
|
||||
if (chan->param_type == SNDRV_MIDI_PARAM_TYPE_REGISTERED)
|
||||
rpn(ops, drv, chan, chset);
|
||||
|
Reference in New Issue
Block a user