* [PATCH] ASoC: adau1761: Mark expected switch fall-though
@ 2018-08-08 19:22 Gustavo A. R. Silva
2018-08-09 9:31 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-08 19:22 UTC (permalink / raw)
To: Lars-Peter Clausen, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai
Cc: alsa-devel, linux-kernel, Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114879 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
sound/soc/codecs/adau1761.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/adau1761.c b/sound/soc/codecs/adau1761.c
index be136e9..bef3e9e 100644
--- a/sound/soc/codecs/adau1761.c
+++ b/sound/soc/codecs/adau1761.c
@@ -518,7 +518,8 @@ static int adau1761_setup_digmic_jackdetect(struct snd_soc_component *component)
ARRAY_SIZE(adau1761_jack_detect_controls));
if (ret)
return ret;
- case ADAU1761_DIGMIC_JACKDET_PIN_MODE_NONE: /* fallthrough */
+ /* fall through */
+ case ADAU1761_DIGMIC_JACKDET_PIN_MODE_NONE:
ret = snd_soc_dapm_add_routes(dapm, adau1761_no_dmic_routes,
ARRAY_SIZE(adau1761_no_dmic_routes));
if (ret)
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: adau1761: Mark expected switch fall-though
2018-08-08 19:22 [PATCH] ASoC: adau1761: Mark expected switch fall-though Gustavo A. R. Silva
@ 2018-08-09 9:31 ` Mark Brown
2018-08-09 11:19 ` [alsa-devel] " Lars-Peter Clausen
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2018-08-09 9:31 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Lars-Peter Clausen, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
alsa-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 546 bytes --]
On Wed, Aug 08, 2018 at 02:22:13PM -0500, Gustavo A. R. Silva wrote:
> @@ -518,7 +518,8 @@ static int adau1761_setup_digmic_jackdetect(struct snd_soc_component *component)
> ARRAY_SIZE(adau1761_jack_detect_controls));
> if (ret)
> return ret;
> - case ADAU1761_DIGMIC_JACKDET_PIN_MODE_NONE: /* fallthrough */
> + /* fall through */
> + case ADAU1761_DIGMIC_JACKDET_PIN_MODE_NONE:
> ret = snd_soc_dapm_add_routes(dapm, adau1761_no_dmic_routes,
> ARRAY_SIZE(adau1761_no_dmic_routes));
> if (ret)
Again, are you *sure* here?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [alsa-devel] [PATCH] ASoC: adau1761: Mark expected switch fall-though
2018-08-09 9:31 ` Mark Brown
@ 2018-08-09 11:19 ` Lars-Peter Clausen
0 siblings, 0 replies; 3+ messages in thread
From: Lars-Peter Clausen @ 2018-08-09 11:19 UTC (permalink / raw)
To: Mark Brown, Gustavo A. R. Silva
Cc: alsa-devel, Liam Girdwood, linux-kernel, Takashi Iwai
On 08/09/2018 11:31 AM, Mark Brown wrote:
> On Wed, Aug 08, 2018 at 02:22:13PM -0500, Gustavo A. R. Silva wrote:
>
>> @@ -518,7 +518,8 @@ static int adau1761_setup_digmic_jackdetect(struct snd_soc_component *component)
>> ARRAY_SIZE(adau1761_jack_detect_controls));
>> if (ret)
>> return ret;
>> - case ADAU1761_DIGMIC_JACKDET_PIN_MODE_NONE: /* fallthrough */
>> + /* fall through */
>> + case ADAU1761_DIGMIC_JACKDET_PIN_MODE_NONE:
>> ret = snd_soc_dapm_add_routes(dapm, adau1761_no_dmic_routes,
>> ARRAY_SIZE(adau1761_no_dmic_routes));
>> if (ret)
>
> Again, are you *sure* here?
Well, it says so in the comment next to it :)
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-09 11:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 19:22 [PATCH] ASoC: adau1761: Mark expected switch fall-though Gustavo A. R. Silva
2018-08-09 9:31 ` Mark Brown
2018-08-09 11:19 ` [alsa-devel] " Lars-Peter Clausen
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).