Skip to contentSkip to conversation

ALSA: intel8x0: Fix fall-through annotations

PATCH Applied Gustavo A. R. Silva 2 participants 6 messages Oct 3, 2018 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: intel8x0: Fix fall-through annotations

Replace "fallthru" with a proper "fall through" annotation.

This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough

---
 sound/pci/intel8x0.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/pci/intel8x0.c +4 -4
index 9517f9b..ffddcdf 100644
@@ -825,7 +825,7 @@ static int snd_intel8x0_pcm_trigger(struct snd_pcm_substream *substream, int cmd
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_RESUME:
 		ichdev->suspended = 0;
-		/* fallthru */
+		/* fall through */
 	case SNDRV_PCM_TRIGGER_START:
 	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
 		val = ICH_IOCE | ICH_STARTBM;
@@ -833,7 +833,7 @@ static int snd_intel8x0_pcm_trigger(struct snd_pcm_substream *substream, int cmd
 		break;
 	case SNDRV_PCM_TRIGGER_SUSPEND:
 		ichdev->suspended = 1;
-		/* fallthru */
+		/* fall through */
 	case SNDRV_PCM_TRIGGER_STOP:
 		val = 0;
 		break;
@@ -867,7 +867,7 @@ static int snd_intel8x0_ali_trigger(struct snd_pcm_substream *substream, int cmd
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_RESUME:
 		ichdev->suspended = 0;
-		/* fallthru */
+		/* fall through */
 	case SNDRV_PCM_TRIGGER_START:
 	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
 		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
@@ -884,7 +884,7 @@ static int snd_intel8x0_ali_trigger(struct snd_pcm_substream *substream, int cmd
 		break;
 	case SNDRV_PCM_TRIGGER_SUSPEND:
 		ichdev->suspended = 1;
-		/* fallthru */
+		/* fall through */
 	case SNDRV_PCM_TRIGGER_STOP:
 	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
 		/* pause */
Signature · 1 line
2.7.4
Applied
#1 lore raw
Quoted 7 lines · Gustavo A. R. Silva

Replace "fallthru" with a proper "fall through" annotation.

This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough

Thanks, applied.

Takashi

#2 lore raw
Quoted 4 lines · Takashi Iwai
Quoted 1 line · Gustavo A. R. Silva
Quoted 8 lines
Quoted 6 lines

Replace "fallthru" with a proper "fall through" annotation.

This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough

Thanks, applied.

BTW, does "fallthru" really cause a warning? I thought it's also accepted as well as "fall-through". At least, my gcc-8 doesn't give a warning with "fallthru".

Takashi

#3 lore raw
Quoted 11 lines · Takashi Iwai
Quoted 9 lines · Takashi Iwai
Quoted 6 lines · Gustavo A. R. Silva

Replace "fallthru" with a proper "fall through" annotation.

This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Thanks, applied.

BTW, does "fallthru" really cause a warning? I thought it's also accepted as well as "fall-through". At least, my gcc-8 doesn't give a warning with "fallthru".

You are correct. It does not trigger a warning.

There are about 50 similar instances in the whole codebase. And, as they are just a few, what I'm trying to do is to replace them with the most commonly used form: "fall through"

Thanks
--
Gustavo

#4 lore raw
Quoted 24 lines · Gustavo A. R. Silva
Quoted 11 lines · Takashi Iwai
Quoted 9 lines · Takashi Iwai
Quoted 6 lines · Gustavo A. R. Silva

Replace "fallthru" with a proper "fall through" annotation.

This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Thanks, applied.

BTW, does "fallthru" really cause a warning? I thought it's also accepted as well as "fall-through". At least, my gcc-8 doesn't give a warning with "fallthru".

Quoted 5 lines

You are correct. It does not trigger a warning.

There are about 50 similar instances in the whole codebase. And, as they are just a few, what I'm trying to do is to replace them with the most commonly used form: "fall through"

Hm, then I'm not sure whether it's worth for further similar replacements. A term "fallthru" is also very commonly used, and the compiler knows it, too, so why bother to rewrite?

I don't mean to revert the already applied changes, but maybe better to concentrate on fixing other real bugs (and/or real warnings).

thanks,

Takashi

#5 lore raw
Quoted 11 lines · Takashi Iwai
Quoted 6 lines

You are correct. It does not trigger a warning.

There are about 50 similar instances in the whole codebase. And, as they are just a few, what I'm trying to do is to replace them with the most commonly used form: "fall through"

Hm, then I'm not sure whether it's worth for further similar replacements. A term "fallthru" is also very commonly used, and the compiler knows it, too, so why bother to rewrite?

Not that common actually. There are more than 2000 instances of "fall through" and just ~50 of "fallthru" and ~40 of "fall thru"

Quoted 3 lines

I don't mean to revert the already applied changes, but maybe better to concentrate on fixing other real bugs (and/or real warnings).

Yeah. Sure thing. It's just that I sort of ran into those cases a few days ago.

Thanks
--
Gustavo