alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
To: "Lars-Peter Clausen" <lars@metafoo.de>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	"James Schulman" <james.schulman@cirrus.com>,
	"David Rhodes" <david.rhodes@cirrus.com>,
	"Charles Keepax" <ckeepax@opensource.cirrus.com>,
	"Richard Fitzgerald" <rf@opensource.cirrus.com>
Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: [PATCH 002/141] ASoC: codecs: Fix fall-through warnings for Clang
Date: Fri, 20 Nov 2020 12:23:50 -0600	[thread overview]
Message-ID: <d17b4d8300dbb6aff0d055b06b487c96ca264757.1605896059.git.gustavoars@kernel.org> (raw)
In-Reply-To: <cover.1605896059.git.gustavoars@kernel.org>

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>
---
 sound/soc/codecs/adav80x.c | 1 +
 sound/soc/codecs/arizona.c | 1 +
 sound/soc/codecs/cs42l52.c | 1 +
 sound/soc/codecs/cs42l56.c | 1 +
 sound/soc/codecs/cs47l92.c | 1 +
 sound/soc/codecs/wm8962.c  | 1 +
 6 files changed, 6 insertions(+)

diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
index 4fd99280d7db..75a649108106 100644
--- a/sound/soc/codecs/adav80x.c
+++ b/sound/soc/codecs/adav80x.c
@@ -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:
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 1228f2de0297..e32871b3f68a 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -1034,6 +1034,7 @@ int arizona_out_ev(struct snd_soc_dapm_widget *w,
 				priv->out_down_delay++;
 				break;
 			}
+			break;
 		default:
 			break;
 		}
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index f772628f233e..796b894c390f 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -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:
diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c
index 97024a6ac96d..bb9599cc832b 100644
--- a/sound/soc/codecs/cs42l56.c
+++ b/sound/soc/codecs/cs42l56.c
@@ -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:
diff --git a/sound/soc/codecs/cs47l92.c b/sound/soc/codecs/cs47l92.c
index 6e34106c268f..52dc29942ec2 100644
--- a/sound/soc/codecs/cs47l92.c
+++ b/sound/soc/codecs/cs47l92.c
@@ -201,6 +201,7 @@ static int cs47l92_outclk_ev(struct snd_soc_dapm_widget *w,
 		default:
 			break;
 		}
+		break;
 	default:
 		break;
 	}
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 0bd3bbc2aacf..3af456010b9c 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -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:
-- 
2.27.0


  reply	other threads:[~2020-11-20 18:24 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-20 18:21 [PATCH 000/141] Fix fall-through warnings for Clang Gustavo A. R. Silva
2020-11-20 18:23 ` Gustavo A. R. Silva [this message]
2020-11-20 18:28 ` Joe Perches
2020-11-20 19:02   ` Gustavo A. R. Silva
2020-11-20 18:33 ` [PATCH 066/141] ALSA: hdspm: " Gustavo A. R. Silva
2020-11-21  8:30   ` Takashi Iwai
2020-11-23 22:56     ` Gustavo A. R. Silva
2020-11-20 18:34 ` [PATCH 067/141] ALSA: pcsp: " Gustavo A. R. Silva
2020-11-21  8:30   ` Takashi Iwai
2020-11-20 18:34 ` [PATCH 068/141] ALSA: sb: " Gustavo A. R. Silva
2020-11-21  8:29   ` Takashi Iwai
2020-11-20 18:39 ` [PATCH 126/141] slimbus: messaging: " Gustavo A. R. Silva
2020-11-24 10:48   ` Srinivas Kandagatla
2020-11-24 14:38     ` Gustavo A. R. Silva
2020-11-20 18:53 ` [PATCH 000/141] " Jakub Kicinski
2020-11-20 19:04   ` Gustavo A. R. Silva
2020-11-20 19:30   ` Kees Cook
2020-11-20 19:51     ` Jakub Kicinski
2020-11-20 20:48       ` Kees Cook
2020-11-22 16:17       ` Kees Cook
2020-11-22 18:21         ` James Bottomley
2020-11-22 18:25           ` Joe Perches
2020-11-22 19:12             ` James Bottomley
2020-11-22 19:22               ` Joe Perches
2020-11-22 19:53                 ` James Bottomley
2020-11-23 13:03                   ` [Intel-wired-lan] " Gustavo A. R. Silva
2020-11-23 16:31                     ` James Bottomley
2020-11-22 20:35           ` Miguel Ojeda
2020-11-22 22:36             ` James Bottomley
2020-11-23 14:19               ` Miguel Ojeda
2020-11-23 15:58                 ` James Bottomley
2020-11-23 16:24                   ` Rafael J. Wysocki
2020-11-23 16:32                   ` Joe Perches
2020-11-23 18:56                   ` Miguel Ojeda
2020-11-23 20:37                     ` James Bottomley
     [not found]                       ` <CANiq72kqO=bYMJnFS2uYRpgWATJ=uXxZuNUsTXT+3aLtrpnzvQ@mail.gmail.com>
     [not found]                         ` <44005bde-f6d4-5eaa-39b8-1a5efeedb2d3@gmail.com>
2020-11-26 14:53                           ` Miguel Ojeda
2020-11-26 15:28                             ` Geert Uytterhoeven
2020-11-26 16:18                               ` Karol Herbst
2020-11-26 17:05                               ` Miguel Ojeda
2020-11-22 22:54             ` Finn Thain
2020-11-22 23:04               ` James Bottomley
2020-11-23 14:05               ` Miguel Ojeda
2020-11-24  0:58                 ` Finn Thain
2020-11-24  1:05                   ` Joe Perches
2020-11-24  2:48                     ` Finn Thain
2020-11-22 22:10           ` Sam Ravnborg
2020-11-24  1:32         ` Nick Desaulniers
2020-11-24  1:46           ` Jakub Kicinski
2020-12-01 14:08           ` Dan Carpenter
2020-12-01 14:04         ` Dan Carpenter
2020-11-20 22:21 ` Miguel Ojeda
2020-11-23 20:03 ` Jason Gunthorpe
2020-11-24 14:47   ` Gustavo A. R. Silva
2020-11-23 20:38 ` Mark Brown
2020-11-24 14:47   ` Gustavo A. R. Silva
     [not found] ` <yq1h7p6gjkk.fsf@ca-mkp.ca.oracle.com>
2020-12-01  8:20   ` Gustavo A. R. Silva
2020-12-08  4:52 ` (subset) " Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d17b4d8300dbb6aff0d055b06b487c96ca264757.1605896059.git.gustavoars@kernel.org \
    --to=gustavoars@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=david.rhodes@cirrus.com \
    --cc=james.schulman@cirrus.com \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=rf@opensource.cirrus.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).