All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SOC: fix tests in cs4270_hw_params()
@ 2008-04-17 15:45 Roel Kluin
  2008-04-17 16:09   ` [alsa-devel] " Takashi Iwai
  2008-04-17 16:41 ` Timur Tabi
  0 siblings, 2 replies; 4+ messages in thread
From: Roel Kluin @ 2008-04-17 15:45 UTC (permalink / raw)
  To: liam.girdwood, broonie, alsa-devel; +Cc: lkml

cs4270_hw_params does several times:

ret = snd_soc_write()
if (ret < 0)
	...

This only works when ret is signed.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index bf2ab72..e73fcfd 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -372,7 +372,7 @@ static int cs4270_hw_params(struct snd_pcm_substream *substream,
 	struct snd_soc_device *socdev = rtd->socdev;
 	struct snd_soc_codec *codec = socdev->codec;
 	struct cs4270_private *cs4270 = codec->private_data;
-	unsigned int ret = 0;
+	int ret;
 	unsigned int i;
 	unsigned int rate;
 	unsigned int ratio;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] SOC: fix tests in cs4270_hw_params()
  2008-04-17 15:45 [PATCH] SOC: fix tests in cs4270_hw_params() Roel Kluin
@ 2008-04-17 16:09   ` Takashi Iwai
  2008-04-17 16:41 ` Timur Tabi
  1 sibling, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2008-04-17 16:09 UTC (permalink / raw)
  To: Roel Kluin; +Cc: liam.girdwood, alsa-devel, broonie, lkml

At Thu, 17 Apr 2008 17:45:39 +0200,
Roel Kluin wrote:
> 
> cs4270_hw_params does several times:
> 
> ret = snd_soc_write()
> if (ret < 0)
> 	...
> 
> This only works when ret is signed.
> 
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>

Applied to ALSA tree.  Thanks.


Takashi

> ---
> diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
> index bf2ab72..e73fcfd 100644
> --- a/sound/soc/codecs/cs4270.c
> +++ b/sound/soc/codecs/cs4270.c
> @@ -372,7 +372,7 @@ static int cs4270_hw_params(struct snd_pcm_substream *substream,
>  	struct snd_soc_device *socdev = rtd->socdev;
>  	struct snd_soc_codec *codec = socdev->codec;
>  	struct cs4270_private *cs4270 = codec->private_data;
> -	unsigned int ret = 0;
> +	int ret;
>  	unsigned int i;
>  	unsigned int rate;
>  	unsigned int ratio;
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [alsa-devel] [PATCH] SOC: fix tests in cs4270_hw_params()
@ 2008-04-17 16:09   ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2008-04-17 16:09 UTC (permalink / raw)
  To: Roel Kluin; +Cc: liam.girdwood, broonie, alsa-devel, lkml

At Thu, 17 Apr 2008 17:45:39 +0200,
Roel Kluin wrote:
> 
> cs4270_hw_params does several times:
> 
> ret = snd_soc_write()
> if (ret < 0)
> 	...
> 
> This only works when ret is signed.
> 
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>

Applied to ALSA tree.  Thanks.


Takashi

> ---
> diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
> index bf2ab72..e73fcfd 100644
> --- a/sound/soc/codecs/cs4270.c
> +++ b/sound/soc/codecs/cs4270.c
> @@ -372,7 +372,7 @@ static int cs4270_hw_params(struct snd_pcm_substream *substream,
>  	struct snd_soc_device *socdev = rtd->socdev;
>  	struct snd_soc_codec *codec = socdev->codec;
>  	struct cs4270_private *cs4270 = codec->private_data;
> -	unsigned int ret = 0;
> +	int ret;
>  	unsigned int i;
>  	unsigned int rate;
>  	unsigned int ratio;
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] SOC: fix tests in cs4270_hw_params()
  2008-04-17 15:45 [PATCH] SOC: fix tests in cs4270_hw_params() Roel Kluin
  2008-04-17 16:09   ` [alsa-devel] " Takashi Iwai
@ 2008-04-17 16:41 ` Timur Tabi
  1 sibling, 0 replies; 4+ messages in thread
From: Timur Tabi @ 2008-04-17 16:41 UTC (permalink / raw)
  To: Roel Kluin; +Cc: alsa-devel

Roel Kluin wrote:
> cs4270_hw_params does several times:
> 
> ret = snd_soc_write()
> if (ret < 0)
> 	...
> 
> This only works when ret is signed.
> 
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>

Thanks, but in the future, please remember to CC the author of the driver when
posting patches for it.

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-17 16:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-17 15:45 [PATCH] SOC: fix tests in cs4270_hw_params() Roel Kluin
2008-04-17 16:09 ` Takashi Iwai
2008-04-17 16:09   ` [alsa-devel] " Takashi Iwai
2008-04-17 16:41 ` Timur Tabi

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.