ASoC: ti: Mark expected switch fall-throughs
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Mon, 29 Jul 2019 22:15:34 +0000 (17:15 -0500)
committerMark Brown <broonie@kernel.org>
Wed, 31 Jul 2019 11:07:03 +0000 (12:07 +0100)
Mark switch cases where we are expecting to fall through.

This patch fixes the following warning (Building: arm):

sound/soc/ti/n810.c: In function ‘n810_ext_control’:
sound/soc/ti/n810.c:48:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
   line1l = 1;
   ~~~~~~~^~~
sound/soc/ti/n810.c:49:2: note: here
  case N810_JACK_HP:
  ^~~~

sound/soc/ti/rx51.c: In function ‘rx51_ext_control’:
sound/soc/ti/rx51.c:57:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   hs = 1;
   ~~~^~~
sound/soc/ti/rx51.c:58:2: note: here
  case RX51_JACK_HP:
  ^~~~

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Link: https://lore.kernel.org/r/20190729221534.GA18696@embeddedor
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/ti/n810.c
sound/soc/ti/rx51.c

index 2c3f2a4c170095402fe6674f35d72280ff8db2d2..3ad2b6daf31eba85159cfdaff3a2acc40aa21359 100644 (file)
@@ -46,6 +46,7 @@ static void n810_ext_control(struct snd_soc_dapm_context *dapm)
        switch (n810_jack_func) {
        case N810_JACK_HS:
                line1l = 1;
+               /* fall through */
        case N810_JACK_HP:
                hp = 1;
                break;
index bc6046534fa5bdd26f0a9446332cc46fed17f0ec..ccd0e8a07dd1c80c9a08202bc8469ac93b88e9b5 100644 (file)
@@ -55,6 +55,7 @@ static void rx51_ext_control(struct snd_soc_dapm_context *dapm)
                break;
        case RX51_JACK_HS:
                hs = 1;
+               /* fall through */
        case RX51_JACK_HP:
                hp = 1;
                break;