ASoC: Intel: Baytrail: Fix implicit fallthrough warning
Subsystems (3)
Cezary Rojewski
maintainerPATCH 1/1 ASoC: Intel: Baytrail: Fix implicit fallthrough warning
Separate _SUSPEND from _PAUSE_PUSH to ensure code is handled correctly while fixing warning reported during compilation.
--- sound/soc/intel/baytrail/sst-baytrail-pcm.c | 2 ++ 1 file changed, 2 insertions(+)
sound/soc/intel/baytrail/sst-baytrail-pcm.c +2 -0
@@ -193,6 +193,8 @@ static int sst_byt_pcm_trigger(struct snd_pcm_substream *substream, int cmd)break ;case SNDRV_PCM_TRIGGER_SUSPEND : pdata->restore_stream = false; +sst_byt_stream_pause (byt, pcm_data->stream); +break ;case SNDRV_PCM_TRIGGER_PAUSE_PUSH :sst_byt_stream_pause (byt, pcm_data->stream);break ;
Signature · 1 line
2.17.1
Quoted 14 lines · Cezary Rojewski
Separate
_SUSPENDfrom_PAUSE_PUSHto ensure code is handled correctly while fixing warning reported during compilation.Fixes b80d19c166c4 ("ASoC: Intel: Restore Baytrail ADSP streams only when ADSP was in reset")Signed-off-by Cezary Rojewski <[email protected]>--- sound/soc/intel/baytrail/sst-baytrail-pcm.c | 2 ++ 1 file changed, 2 insertions(+)sound/soc/intel/baytrail/sst-baytrail-pcm.c +0
-0
sound/soc/intel/baytrail/sst-baytrail-pcm.c static int sst_byt_pcm_trigger(struct snd_pcm_substream *substream, int cmd) · line 197
Quoted 5 lines
sound/soc/intel/baytrail/sst-baytrail-pcm.c +2
-0@@ -193,6 +193,8 @@ static int sst_byt_pcm_trigger(struct snd_pcm_substream *substream, int cmd)break ;case SNDRV_PCM_TRIGGER_SUSPEND : pdata->restore_stream = false; +sst_byt_stream_pause (byt, pcm_data->stream); +break ;
why not just a /* fallthrough */ statement?
Quoted 4 lines
sound/soc/intel/baytrail/sst-baytrail-pcm.c +0
-0case SNDRV_PCM_TRIGGER_PAUSE_PUSH :sst_byt_stream_pause (byt, pcm_data->stream);break ;
Cezary Rojewski
maintainerQuoted 10 lines · Pierre-Louis Bossart
Quoted 9 lines · Cezary Rojewski
Separate
_SUSPENDfrom_PAUSE_PUSHto ensure code is handled correctly while fixing warning reported during compilation.Fixes b80d19c166c4 ("ASoC: Intel: Restore Baytrail ADSP streams only when ADSP was in reset")Signed-off-by Cezary Rojewski <[email protected]>---
sound/soc/intel/baytrail/sst-baytrail-pcm.c| 2 ++1 file changed, 2 insertions(+)
Quoted 14 lines
Quoted 11 lines
sound/soc/intel/baytrail/sst-baytrail-pcm.c +0
-0@@ -193,6 +193,8 @@ static int sst_byt_pcm_trigger(struct snd_pcm_substream *substream, int cmd) break;case
SNDRV_PCM_TRIGGER_SUSPEND:
pdata->restore_stream= false;
+sst_byt_stream_pause(byt, pcm_data->stream); + break;why not just a /* fallthrough */ statement?
Just a matter of taste. Sending v2 with update.
Quoted 5 lines
Quoted 4 lines
case
SNDRV_PCM_TRIGGER_PAUSE_PUSH:
sst_byt_stream_pause(byt, pcm_data->stream); break;
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel