ASoC: codecs: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 20 Nov 2020 18:23:50 +0000 (12:23 -0600)
committerMark Brown <broonie@kernel.org>
Fri, 20 Nov 2020 19:28:34 +0000 (19:28 +0000)
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding multiple break statements instead of just
letting the code fall through, and also add fallthrough pseudo-keywords
in places where the code is intended to fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/d17b4d8300dbb6aff0d055b06b487c96ca264757.1605896059.git.gustavoars@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/adav80x.c
sound/soc/codecs/arizona.c
sound/soc/codecs/cs42l52.c
sound/soc/codecs/cs42l56.c
sound/soc/codecs/cs47l92.c
sound/soc/codecs/wm8962.c

index 4fd99280d7dbb9a921437ac431509a14d07a8200..75a6491081066e7fc9f4f1c77d694ef18bd0d3b6 100644 (file)
@@ -373,6 +373,7 @@ static int adav80x_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
        case SND_SOC_DAIFMT_CBM_CFM:
                capture |= ADAV80X_CAPTURE_MODE_MASTER;
                playback |= ADAV80X_PLAYBACK_MODE_MASTER;
+               break;
        case SND_SOC_DAIFMT_CBS_CFS:
                break;
        default:
index 1228f2de02975cadb757c3c92c94119c1b612572..e32871b3f68ac9dd4174a40656ac741a5345b5d2 100644 (file)
@@ -1034,6 +1034,7 @@ int arizona_out_ev(struct snd_soc_dapm_widget *w,
                                priv->out_down_delay++;
                                break;
                        }
+                       break;
                default:
                        break;
                }
index f772628f233ef5b5596d0e06ef805a80dacc68d9..796b894c390fecc706bd3d00325583d4c9a89282 100644 (file)
@@ -944,6 +944,7 @@ static int cs42l52_beep_event(struct input_dev *dev, unsigned int type,
        case SND_BELL:
                if (hz)
                        hz = 261;
+               break;
        case SND_TONE:
                break;
        default:
index 97024a6ac96d78450c11eb1683c428e141d7fba2..bb9599cc832bcb5f33e75dabd49dea6f4e83ad2e 100644 (file)
@@ -1008,6 +1008,7 @@ static int cs42l56_beep_event(struct input_dev *dev, unsigned int type,
        case SND_BELL:
                if (hz)
                        hz = 261;
+               break;
        case SND_TONE:
                break;
        default:
index 6e34106c268f5d7bc7092005c6a6d4da5d661de3..52dc29942ec271f25c2b8d695e8ec0b45cacb7e2 100644 (file)
@@ -201,6 +201,7 @@ static int cs47l92_outclk_ev(struct snd_soc_dapm_widget *w,
                default:
                        break;
                }
+               break;
        default:
                break;
        }
index 0bd3bbc2aacfe52491d039539fe7f36678fd240c..3af456010b9c59e0f3cde623d648ab12bb5e59f2 100644 (file)
@@ -3203,6 +3203,7 @@ static int wm8962_beep_event(struct input_dev *dev, unsigned int type,
        case SND_BELL:
                if (hz)
                        hz = 1000;
+               fallthrough;
        case SND_TONE:
                break;
        default: