mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: valdis.kletnieks@vt.edu
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>,
	patches@opensource.cirrus.com, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org, Takashi Iwai <tiwai@suse.com>,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH 11/11] ASoC: wm8994: Mark expected switch fall-through
Date: Fri, 3 Aug 2018 11:41:39 -0500	[thread overview]
Message-ID: <85d918a5-6a14-ead0-4d0e-d63b5e43ad81@embeddedor.com> (raw)
In-Reply-To: <30613.1533313609@turing-police.cc.vt.edu>



On 08/03/2018 11:26 AM, valdis.kletnieks@vt.edu wrote:
> On Wed, 01 Aug 2018 14:56:16 -0500, "Gustavo A. R. Silva" said:
> 
>> diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
>> index 7fdfdf3..62f8c5b 100644
>> --- a/sound/soc/codecs/wm8994.c
>> +++ b/sound/soc/codecs/wm8994.c
>> @@ -2432,6 +2432,7 @@ static int wm8994_set_dai_sysclk(struct snd_soc_dai *dai,
>>  			snd_soc_component_update_bits(component, WM8994_POWER_MANAGEMENT_2,
>>  					    WM8994_OPCLK_ENA, 0);
>>  		}
>> +		/* fall through */
>>
>>  	default:
>>  		return -EINVAL;
> 
> Wait, what? This looks like the sort of bug -Wimplicit-fallthrough is supposed
> to catch.  Unless for 'case WM8994_SYSCLK_OPCLK:' we actually do want to do a
> whole bunch of snd_soc_component_update_bits() calls and then return -EINVAL
> whether or not that case succeeded?
> 
> 

Yeah, it seems like a bug. Can someone confirm this?

Notice that this code has been there since 2010.

Thanks Valdis for pointing this out.
--
Gustavo

  reply	other threads:[~2018-08-03 16:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01 19:47 [PATCH 00/11] ASoC: codecs: Mark expected switch fall-throughs Gustavo A. R. Silva
2018-08-01 19:47 ` [PATCH 01/11] ASoC: wm8961: Mark expected switch fall-through Gustavo A. R. Silva
2018-08-01 19:49 ` [PATCH 02/11] ASoC: rt5640: " Gustavo A. R. Silva
2018-08-01 19:50 ` [PATCH 03/11] ASoC: rt5677: " Gustavo A. R. Silva
2018-08-01 19:51 ` [PATCH 04/11] ASoC: wm8955: " Gustavo A. R. Silva
2018-08-01 19:51 ` [PATCH 05/11] ASoC: wm8960: " Gustavo A. R. Silva
2018-08-01 19:52 ` [PATCH 06/11] ASoC: wm8904: " Gustavo A. R. Silva
2018-08-01 19:53 ` [PATCH 07/11] ASoC: wm8996: " Gustavo A. R. Silva
2018-08-01 19:54 ` [PATCH 08/11] ASoC: wm8962: " Gustavo A. R. Silva
2018-08-01 19:54 ` [PATCH 09/11] ASoC: wm8995: " Gustavo A. R. Silva
2018-08-01 19:55 ` [PATCH 10/11] ASoC: wm9081: " Gustavo A. R. Silva
2018-08-01 19:56 ` [PATCH 11/11] ASoC: wm8994: " Gustavo A. R. Silva
2018-08-03 16:26   ` valdis.kletnieks
2018-08-03 16:41     ` Gustavo A. R. Silva [this message]
2018-08-03 16:45       ` Mark Brown
2018-08-03 16:56         ` Gustavo A. R. Silva
2018-08-03 17:55           ` valdis.kletnieks
2018-08-03 18:24             ` Gustavo A. R. Silva
2018-08-06 11:34             ` Mark Brown
2018-08-06 11:48               ` Gustavo A. R. Silva
2018-08-06 11:52                 ` Mark Brown
2018-08-06 11:59                   ` Gustavo A. R. Silva

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=85d918a5-6a14-ead0-4d0e-d63b5e43ad81@embeddedor.com \
    --to=gustavo@embeddedor.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=valdis.kletnieks@vt.edu \
    /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

all inboxes | Powered by JetHome®