Skip to contentSkip to conversation

ASoC: Intel: Baytrail: Fix implicit fallthrough warning

PATCH Superseded Cezary Rojewski 2 participants 3 messages Aug 22, 2019 – Aug 28, 2019

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Cezary Rojewski

author maintainer
#0 lore raw

PATCH 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.

Fixes b80d19c166c4 ("ASoC: Intel: Restore Baytrail ADSP streams only when ADSP was in reset")
---
 sound/soc/intel/baytrail/sst-baytrail-pcm.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/intel/baytrail/sst-baytrail-pcm.c +2 -0
index 9cbc982d46a9..eddb24ab8072 100644
@@ -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
#1 lore raw
Quoted 14 lines · Cezary Rojewski

Separate _SUSPEND from _PAUSE_PUSH to 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")
---
  sound/soc/intel/baytrail/sst-baytrail-pcm.c | 2 ++
  1 file changed, 2 insertions(+)
sound/soc/intel/baytrail/sst-baytrail-pcm.c +0 -0
index 9cbc982d46a9..eddb24ab8072 100644

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 -0
  	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
  		sst_byt_stream_pause(byt, pcm_data->stream);
  		break;
author maintainer
#2 lore raw
Quoted 10 lines · Pierre-Louis Bossart
Quoted 9 lines · Cezary Rojewski

Separate _SUSPEND from _PAUSE_PUSH to 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")

---
  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
index 9cbc982d46a9..eddb24ab8072 100644
@@ -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