* [patch] ASoC: wm8994: missing break in wm8994_aif3_hw_params()
@ 2013-04-30 7:24 ` Dan Carpenter
0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2013-04-30 7:24 UTC (permalink / raw)
To: Mark Brown
Cc: alsa-devel, Takashi Iwai, patches, kernel-janitors, Liam Girdwood
The missing break here means that we always return early and the
function is a no-op.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
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;
}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [patch] ASoC: wm8994: missing break in wm8994_aif3_hw_params()
@ 2013-04-30 7:24 ` Dan Carpenter
0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2013-04-30 7:24 UTC (permalink / raw)
To: Mark Brown
Cc: alsa-devel, Takashi Iwai, patches, kernel-janitors, Liam Girdwood
The missing break here means that we always return early and the
function is a no-op.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
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;
}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [patch] ASoC: wm8994: missing break in wm8994_aif3_hw_params()
2013-04-30 7:24 ` Dan Carpenter
@ 2013-04-30 7:49 ` walter harms
-1 siblings, 0 replies; 8+ messages in thread
From: walter harms @ 2013-04-30 7:49 UTC (permalink / raw)
To: Dan Carpenter
Cc: alsa-devel, Mark Brown, Takashi Iwai, patches, kernel-janitors,
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 <dan.carpenter@oracle.com>
> ---
>
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] ASoC: wm8994: missing break in wm8994_aif3_hw_params()
@ 2013-04-30 7:49 ` walter harms
0 siblings, 0 replies; 8+ messages in thread
From: walter harms @ 2013-04-30 7:49 UTC (permalink / raw)
To: Dan Carpenter
Cc: alsa-devel, Mark Brown, Takashi Iwai, patches, kernel-janitors,
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 <dan.carpenter@oracle.com>
> ---
>
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [alsa-devel] [patch] ASoC: wm8994: missing break in wm8994_aif3_hw_params()
2013-04-30 7:24 ` Dan Carpenter
@ 2013-04-30 18:06 ` Mark Brown
-1 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2013-04-30 18:06 UTC (permalink / raw)
To: Dan Carpenter
Cc: Takashi Iwai, alsa-devel, patches, kernel-janitors, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
On Tue, Apr 30, 2013 at 10:24:41AM +0300, Dan Carpenter wrote:
> The missing break here means that we always return early and the
> function is a no-op.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] ASoC: wm8994: missing break in wm8994_aif3_hw_params()
@ 2013-04-30 18:06 ` Mark Brown
0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2013-04-30 18:06 UTC (permalink / raw)
To: Dan Carpenter
Cc: Takashi Iwai, alsa-devel, patches, kernel-janitors, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 171 bytes --]
On Tue, Apr 30, 2013 at 10:24:41AM +0300, Dan Carpenter wrote:
> The missing break here means that we always return early and the
> function is a no-op.
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [alsa-devel] [patch] ASoC: wm8994: missing break in wm8994_aif3_hw_params()
2013-04-30 7:49 ` walter harms
@ 2013-04-30 18:07 ` Mark Brown
-1 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2013-04-30 18:07 UTC (permalink / raw)
To: walter harms
Cc: alsa-devel, Takashi Iwai, patches, kernel-janitors,
Liam Girdwood, Dan Carpenter
[-- Attachment #1: Type: text/plain, Size: 341 bytes --]
On Tue, Apr 30, 2013 at 09:49:34AM +0200, walter harms wrote:
> 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
I don't think that's a good idea, it does nothing for the readability
and isn't idiomatic.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] ASoC: wm8994: missing break in wm8994_aif3_hw_params()
@ 2013-04-30 18:07 ` Mark Brown
0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2013-04-30 18:07 UTC (permalink / raw)
To: walter harms
Cc: alsa-devel, Takashi Iwai, patches, kernel-janitors,
Liam Girdwood, Dan Carpenter
[-- Attachment #1.1: Type: text/plain, Size: 341 bytes --]
On Tue, Apr 30, 2013 at 09:49:34AM +0200, walter harms wrote:
> 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
I don't think that's a good idea, it does nothing for the readability
and isn't idiomatic.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-04-30 18:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-30 7:24 [patch] ASoC: wm8994: missing break in wm8994_aif3_hw_params() Dan Carpenter
2013-04-30 7:24 ` Dan Carpenter
2013-04-30 7:49 ` walter harms
2013-04-30 7:49 ` walter harms
2013-04-30 18:07 ` [alsa-devel] " Mark Brown
2013-04-30 18:07 ` Mark Brown
2013-04-30 18:06 ` [alsa-devel] " Mark Brown
2013-04-30 18:06 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.