LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/7] mark expected switch fall-throughs
@ 2017-11-08 20:03 Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 1/7] ASoC: msm8916-wcd-analog: mark expected switch fall-through Gustavo A. R. Silva
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: Gustavo A. R. Silva @ 2017-11-08 20:03 UTC (permalink / raw)
To: alsa-devel, linux-kernel, patches
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, this patchset aims
to mark switch cases where we are expecting to fall through.
Thanks!
Gustavo A. R. Silva (7):
ASoC: msm8916-wcd-analog: mark expected switch fall-through
ASoC: tlv320aic23: mark expected switch fall-through
ASoC: tlv320dac31xx: mark expected switch fall-through
ASoC: tpa6130a2: mark expected switch fall-through
ASoC: wm8753: mark expected switch fall-throughs
ASoC: wm8993: mark expected switch fall-throughs
ASoC: wm8994: mark expected switch fall-throughs
sound/soc/codecs/msm8916-wcd-analog.c | 1 +
sound/soc/codecs/tlv320aic23.c | 1 +
sound/soc/codecs/tlv320aic31xx.c | 2 +-
sound/soc/codecs/tpa6130a2.c | 1 +
sound/soc/codecs/wm8753.c | 4 ++--
sound/soc/codecs/wm8993.c | 2 ++
sound/soc/codecs/wm8994.c | 2 ++
7 files changed, 10 insertions(+), 3 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/7] ASoC: msm8916-wcd-analog: mark expected switch fall-through
2017-11-08 20:03 [PATCH 0/7] mark expected switch fall-throughs Gustavo A. R. Silva
@ 2017-11-08 20:04 ` Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 2/7] ASoC: tlv320aic23: " Gustavo A. R. Silva
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Gustavo A. R. Silva @ 2017-11-08 20:04 UTC (permalink / raw)
To: 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: 1397957
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
sound/soc/codecs/msm8916-wcd-analog.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c
index 7ff42ef..5f3c42c 100644
--- a/sound/soc/codecs/msm8916-wcd-analog.c
+++ b/sound/soc/codecs/msm8916-wcd-analog.c
@@ -621,6 +621,7 @@ static int pm8916_wcd_analog_enable_adc(struct snd_soc_dapm_widget *w,
case CDC_A_TX_2_EN:
snd_soc_update_bits(codec, CDC_A_MICB_1_CTL,
MICB_1_CTL_CFILT_REF_SEL_MASK, 0);
+ /* fall through */
case CDC_A_TX_3_EN:
snd_soc_update_bits(codec, CDC_D_CDC_CONN_TX2_CTL,
CONN_TX2_SERIAL_TX2_MUX,
--
2.7.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/7] ASoC: tlv320aic23: mark expected switch fall-through
2017-11-08 20:03 [PATCH 0/7] mark expected switch fall-throughs Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 1/7] ASoC: msm8916-wcd-analog: mark expected switch fall-through Gustavo A. R. Silva
@ 2017-11-08 20:04 ` Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 3/7] ASoC: tlv320dac31xx: " Gustavo A. R. Silva
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Gustavo A. R. Silva @ 2017-11-08 20:04 UTC (permalink / raw)
To: 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: 146566
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
sound/soc/codecs/tlv320aic23.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
index 3d42138..7490921 100644
--- a/sound/soc/codecs/tlv320aic23.c
+++ b/sound/soc/codecs/tlv320aic23.c
@@ -454,6 +454,7 @@ static int tlv320aic23_set_dai_fmt(struct snd_soc_dai *codec_dai,
break;
case SND_SOC_DAIFMT_DSP_A:
iface_reg |= TLV320AIC23_LRP_ON;
+ /* fall through */
case SND_SOC_DAIFMT_DSP_B:
iface_reg |= TLV320AIC23_FOR_DSP;
break;
--
2.7.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/7] ASoC: tlv320dac31xx: mark expected switch fall-through
2017-11-08 20:03 [PATCH 0/7] mark expected switch fall-throughs Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 1/7] ASoC: msm8916-wcd-analog: mark expected switch fall-through Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 2/7] ASoC: tlv320aic23: " Gustavo A. R. Silva
@ 2017-11-08 20:04 ` Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 4/7] ASoC: tpa6130a2: " Gustavo A. R. Silva
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Gustavo A. R. Silva @ 2017-11-08 20:04 UTC (permalink / raw)
To: 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: 1195220
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
sound/soc/codecs/tlv320aic31xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index 54a87a9..e286237 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -929,7 +929,7 @@ static int aic31xx_set_dai_fmt(struct snd_soc_dai *codec_dai,
case SND_SOC_DAIFMT_I2S:
break;
case SND_SOC_DAIFMT_DSP_A:
- dsp_a_val = 0x1;
+ dsp_a_val = 0x1; /* fall through */
case SND_SOC_DAIFMT_DSP_B:
/* NOTE: BCLKINV bit value 1 equas NB and 0 equals IB */
switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
--
2.7.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/7] ASoC: tpa6130a2: mark expected switch fall-through
2017-11-08 20:03 [PATCH 0/7] mark expected switch fall-throughs Gustavo A. R. Silva
` (2 preceding siblings ...)
2017-11-08 20:04 ` [PATCH 3/7] ASoC: tlv320dac31xx: " Gustavo A. R. Silva
@ 2017-11-08 20:04 ` Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 5/7] ASoC: wm8753: mark expected switch fall-throughs Gustavo A. R. Silva
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Gustavo A. R. Silva @ 2017-11-08 20:04 UTC (permalink / raw)
To: 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: 115164
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
sound/soc/codecs/tpa6130a2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c
index 2e014c8..616cd4b 100644
--- a/sound/soc/codecs/tpa6130a2.c
+++ b/sound/soc/codecs/tpa6130a2.c
@@ -274,6 +274,7 @@ static int tpa6130a2_probe(struct i2c_client *client,
default:
dev_warn(dev, "Unknown TPA model (%d). Assuming 6130A2\n",
data->id);
+ /* fall through */
case TPA6130A2:
regulator = "Vdd";
break;
--
2.7.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 5/7] ASoC: wm8753: mark expected switch fall-throughs
2017-11-08 20:03 [PATCH 0/7] mark expected switch fall-throughs Gustavo A. R. Silva
` (3 preceding siblings ...)
2017-11-08 20:04 ` [PATCH 4/7] ASoC: tpa6130a2: " Gustavo A. R. Silva
@ 2017-11-08 20:04 ` Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 6/7] ASoC: wm8993: " Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 7/7] ASoC: wm8994: " Gustavo A. R. Silva
6 siblings, 0 replies; 9+ messages in thread
From: Gustavo A. R. Silva @ 2017-11-08 20:04 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: alsa-devel, linux-kernel, patches, Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 146568
Addresses-Coverity-ID: 146569
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
sound/soc/codecs/wm8753.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index d05d76e..0271a52 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -971,7 +971,7 @@ static int wm8753_pcm_set_dai_fmt(struct snd_soc_codec *codec,
case SND_SOC_DAIFMT_CBS_CFS:
break;
case SND_SOC_DAIFMT_CBM_CFM:
- ioctl |= 0x2;
+ ioctl |= 0x2; /* fall through */
case SND_SOC_DAIFMT_CBM_CFS:
voice |= 0x0040;
break;
@@ -1096,7 +1096,7 @@ static int wm8753_i2s_set_dai_fmt(struct snd_soc_codec *codec,
case SND_SOC_DAIFMT_CBS_CFS:
break;
case SND_SOC_DAIFMT_CBM_CFM:
- ioctl |= 0x1;
+ ioctl |= 0x1; /* fall through */
case SND_SOC_DAIFMT_CBM_CFS:
hifi |= 0x0040;
break;
--
2.7.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 6/7] ASoC: wm8993: mark expected switch fall-throughs
2017-11-08 20:03 [PATCH 0/7] mark expected switch fall-throughs Gustavo A. R. Silva
` (4 preceding siblings ...)
2017-11-08 20:04 ` [PATCH 5/7] ASoC: wm8753: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2017-11-08 20:04 ` Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 7/7] ASoC: wm8994: " Gustavo A. R. Silva
6 siblings, 0 replies; 9+ messages in thread
From: Gustavo A. R. Silva @ 2017-11-08 20:04 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: alsa-devel, linux-kernel, patches, Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 115168
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
sound/soc/codecs/wm8993.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c
index 195f7bf..830ffd80 100644
--- a/sound/soc/codecs/wm8993.c
+++ b/sound/soc/codecs/wm8993.c
@@ -1076,6 +1076,7 @@ static int wm8993_set_sysclk(struct snd_soc_dai *codec_dai,
switch (clk_id) {
case WM8993_SYSCLK_MCLK:
wm8993->mclk_rate = freq;
+ /* fall through */
case WM8993_SYSCLK_FLL:
wm8993->sysclk_source = clk_id;
break;
@@ -1123,6 +1124,7 @@ static int wm8993_set_dai_fmt(struct snd_soc_dai *dai,
switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
case SND_SOC_DAIFMT_DSP_B:
aif1 |= WM8993_AIF_LRCLK_INV;
+ /* fall through */
case SND_SOC_DAIFMT_DSP_A:
aif1 |= 0x18;
break;
--
2.7.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 7/7] ASoC: wm8994: mark expected switch fall-throughs
2017-11-08 20:03 [PATCH 0/7] mark expected switch fall-throughs Gustavo A. R. Silva
` (5 preceding siblings ...)
2017-11-08 20:04 ` [PATCH 6/7] ASoC: wm8993: " Gustavo A. R. Silva
@ 2017-11-08 20:04 ` Gustavo A. R. Silva
2017-11-23 6:41 ` Charles Keepax
6 siblings, 1 reply; 9+ messages in thread
From: Gustavo A. R. Silva @ 2017-11-08 20:04 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: alsa-devel, linux-kernel, patches, Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 402005
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
sound/soc/codecs/wm8994.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 3896523..f91b49e 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -860,6 +860,7 @@ static void vmid_reference(struct snd_soc_codec *codec)
switch (wm8994->vmid_mode) {
default:
WARN_ON(NULL == "Invalid VMID mode");
+ /* fall through */
case WM8994_VMID_NORMAL:
/* Startup bias, VMID ramp & buffer */
snd_soc_update_bits(codec, WM8994_ANTIPOP_2,
@@ -2654,6 +2655,7 @@ static int wm8994_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
case SND_SOC_DAIFMT_DSP_B:
aif1 |= WM8994_AIF1_LRCLK_INV;
lrclk |= WM8958_AIF1_LRCLK_INV;
+ /* fall through */
case SND_SOC_DAIFMT_DSP_A:
aif1 |= 0x18;
break;
--
2.7.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 7/7] ASoC: wm8994: mark expected switch fall-throughs
2017-11-08 20:04 ` [PATCH 7/7] ASoC: wm8994: " Gustavo A. R. Silva
@ 2017-11-23 6:41 ` Charles Keepax
0 siblings, 0 replies; 9+ messages in thread
From: Charles Keepax @ 2017-11-23 6:41 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
alsa-devel, linux-kernel, patches
On Wed, Nov 08, 2017 at 02:04:43PM -0600, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 402005
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-11-23 6:42 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08 20:03 [PATCH 0/7] mark expected switch fall-throughs Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 1/7] ASoC: msm8916-wcd-analog: mark expected switch fall-through Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 2/7] ASoC: tlv320aic23: " Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 3/7] ASoC: tlv320dac31xx: " Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 4/7] ASoC: tpa6130a2: " Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 5/7] ASoC: wm8753: mark expected switch fall-throughs Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 6/7] ASoC: wm8993: " Gustavo A. R. Silva
2017-11-08 20:04 ` [PATCH 7/7] ASoC: wm8994: " Gustavo A. R. Silva
2017-11-23 6:41 ` Charles Keepax
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).