From: Lars-Peter Clausen <lars@metafoo.de>
To: Dan Carpenter <error27@gmail.com>
Cc: "open list:SOUND - SOC LAYER..." <alsa-devel@alsa-project.org>,
Takashi Iwai <tiwai@suse.de>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
kernel-janitors@vger.kernel.org, Liam Girdwood <lrg@ti.com>
Subject: Re: [patch] ASoC: adau1701: signedness bug in adau1701_write()
Date: Mon, 20 Jun 2011 12:03:02 +0200 [thread overview]
Message-ID: <4DFF1AD6.4090103@metafoo.de> (raw)
In-Reply-To: <20110620071125.GG14591@shale.localdomain>
On 06/20/2011 09:11 AM, Dan Carpenter wrote:
> "ret" is supposed to be signed here. The current code will only
> return -EIO on error, instead of a more appropriate error code such
> as -EAGAIN etc.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Thanks
>
> diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
> index 6c01bb6..2758d5f 100644
> --- a/sound/soc/codecs/adau1701.c
> +++ b/sound/soc/codecs/adau1701.c
> @@ -140,9 +140,10 @@ static unsigned int adau1701_register_size(struct snd_soc_codec *codec,
> static int adau1701_write(struct snd_soc_codec *codec, unsigned int reg,
> unsigned int value)
> {
> - unsigned int i, ret;
> + unsigned int i;
> unsigned int size;
> uint8_t buf[4];
> + int ret;
>
> size = adau1701_register_size(codec, reg);
> if (size == 0)
WARNING: multiple messages have this Message-ID (diff)
From: Lars-Peter Clausen <lars@metafoo.de>
To: Dan Carpenter <error27@gmail.com>
Cc: "open list:SOUND - SOC LAYER..." <alsa-devel@alsa-project.org>,
Takashi Iwai <tiwai@suse.de>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
kernel-janitors@vger.kernel.org, Liam Girdwood <lrg@ti.com>
Subject: Re: [patch] ASoC: adau1701: signedness bug in adau1701_write()
Date: Mon, 20 Jun 2011 10:03:02 +0000 [thread overview]
Message-ID: <4DFF1AD6.4090103@metafoo.de> (raw)
In-Reply-To: <20110620071125.GG14591@shale.localdomain>
On 06/20/2011 09:11 AM, Dan Carpenter wrote:
> "ret" is supposed to be signed here. The current code will only
> return -EIO on error, instead of a more appropriate error code such
> as -EAGAIN etc.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Thanks
>
> diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
> index 6c01bb6..2758d5f 100644
> --- a/sound/soc/codecs/adau1701.c
> +++ b/sound/soc/codecs/adau1701.c
> @@ -140,9 +140,10 @@ static unsigned int adau1701_register_size(struct snd_soc_codec *codec,
> static int adau1701_write(struct snd_soc_codec *codec, unsigned int reg,
> unsigned int value)
> {
> - unsigned int i, ret;
> + unsigned int i;
> unsigned int size;
> uint8_t buf[4];
> + int ret;
>
> size = adau1701_register_size(codec, reg);
> if (size = 0)
next prev parent reply other threads:[~2011-06-20 10:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-20 7:11 [patch] ASoC: adau1701: signedness bug in adau1701_write() Dan Carpenter
2011-06-20 7:11 ` Dan Carpenter
2011-06-20 10:03 ` Lars-Peter Clausen [this message]
2011-06-20 10:03 ` Lars-Peter Clausen
2011-06-20 14:03 ` Liam Girdwood
2011-06-20 14:03 ` Liam Girdwood
2011-06-20 17:49 ` Mark Brown
2011-06-20 17:49 ` Mark Brown
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=4DFF1AD6.4090103@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lrg@ti.com \
--cc=tiwai@suse.de \
/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 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.