From mboxrd@z Thu Jan 1 00:00:00 1970 From: walter harms Subject: Re: [patch] ASoC: wm8994: missing break in wm8994_aif3_hw_params() Date: Tue, 30 Apr 2013 09:49:34 +0200 Message-ID: <517F778E.3020700@bfs.de> References: <20130430072441.GB7237@elgon.mountain> Reply-To: wharms@bfs.de Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx01.sz.bfs.de (mx01.sz.bfs.de [194.94.69.103]) by alsa0.perex.cz (Postfix) with ESMTP id 99413264F2D for ; Tue, 30 Apr 2013 09:50:07 +0200 (CEST) In-Reply-To: <20130430072441.GB7237@elgon.mountain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Dan Carpenter Cc: alsa-devel@alsa-project.org, Mark Brown , Takashi Iwai , patches@opensource.wolfsonmicro.com, kernel-janitors@vger.kernel.org, Liam Girdwood List-Id: alsa-devel@alsa-project.org Am 30.04.2013 09:24, schrieb Dan Carpenter: > The missing break here means that we always return early and the > function is a no-op. > > Signed-off-by: Dan Carpenter > --- > > diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c > index 14094f5..1eb152c 100644 > --- a/sound/soc/codecs/wm8994.c > +++ b/sound/soc/codecs/wm8994.c > @@ -2882,6 +2882,7 @@ static int wm8994_aif3_hw_params(struct snd_pcm_substream *substream, > default: > return 0; > } > + break; > default: > return 0; > } the patch seems ok, but i would question the wisdom of a nested switch here, obviously the readability suffers and since it is only one case it seems better to be replaced it with if (dai->id != 3) return 0; Please can the maintainer comment on that ? just my 2 cents, wh From mboxrd@z Thu Jan 1 00:00:00 1970 From: walter harms Date: Tue, 30 Apr 2013 07:49:34 +0000 Subject: Re: [patch] ASoC: wm8994: missing break in wm8994_aif3_hw_params() Message-Id: <517F778E.3020700@bfs.de> List-Id: References: <20130430072441.GB7237@elgon.mountain> In-Reply-To: <20130430072441.GB7237@elgon.mountain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dan Carpenter Cc: alsa-devel@alsa-project.org, Mark Brown , Takashi Iwai , patches@opensource.wolfsonmicro.com, kernel-janitors@vger.kernel.org, Liam Girdwood Am 30.04.2013 09:24, schrieb Dan Carpenter: > The missing break here means that we always return early and the > function is a no-op. > > Signed-off-by: Dan Carpenter > --- > > diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c > index 14094f5..1eb152c 100644 > --- a/sound/soc/codecs/wm8994.c > +++ b/sound/soc/codecs/wm8994.c > @@ -2882,6 +2882,7 @@ static int wm8994_aif3_hw_params(struct snd_pcm_substream *substream, > default: > return 0; > } > + break; > default: > return 0; > } the patch seems ok, but i would question the wisdom of a nested switch here, obviously the readability suffers and since it is only one case it seems better to be replaced it with if (dai->id != 3) return 0; Please can the maintainer comment on that ? just my 2 cents, wh