diff mbox series

ASoC: ti: Mark expected switch fall-throughs

Message ID 20190729221534.GA18696@embeddedor (mailing list archive)
State Accepted
Commit 22581e7c51f50fbbadba70499bb5e2d09f830cbb
Headers show
Series ASoC: ti: Mark expected switch fall-throughs | expand

Commit Message

Gustavo A. R. Silva July 29, 2019, 10:15 p.m. UTC
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>
---
 sound/soc/ti/n810.c | 1 +
 sound/soc/ti/rx51.c | 1 +
 2 files changed, 2 insertions(+)

Comments

Jarkko Nikula July 30, 2019, 10:55 a.m. UTC | #1
On Mon, Jul 29, 2019 at 05:15:34PM -0500, Gustavo A. R. Silva wrote:
> 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>
> ---
>  sound/soc/ti/n810.c | 1 +
>  sound/soc/ti/rx51.c | 1 +
>  2 files changed, 2 insertions(+)
> 
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
diff mbox series

Patch

diff --git a/sound/soc/ti/n810.c b/sound/soc/ti/n810.c
index 2c3f2a4c1700..3ad2b6daf31e 100644
--- a/sound/soc/ti/n810.c
+++ b/sound/soc/ti/n810.c
@@ -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;
diff --git a/sound/soc/ti/rx51.c b/sound/soc/ti/rx51.c
index bc6046534fa5..ccd0e8a07dd1 100644
--- a/sound/soc/ti/rx51.c
+++ b/sound/soc/ti/rx51.c
@@ -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;