public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Michael Hennerich <michael.hennerich@analog.com>,
	linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] Staging: iio/dac/ad5360.c: signedness bug in ad5360_read_raw()
Date: Sun, 30 Oct 2011 10:45:08 +0000	[thread overview]
Message-ID: <4EAD2AB4.1010009@metafoo.de> (raw)
In-Reply-To: <20111029072106.GD17780@elgon.mountain>

On 10/29/2011 09:21 AM, Dan Carpenter wrote:
> ad5360_get_channel_vref() returns an int and scale_uv should be the
> same.  Making it unsigned here breaks the error handling.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

Thanks.

> diff --git a/drivers/staging/iio/dac/ad5360.c b/drivers/staging/iio/dac/ad5360.c
> index 72d0f3f..cfeea72 100644
> --- a/drivers/staging/iio/dac/ad5360.c
> +++ b/drivers/staging/iio/dac/ad5360.c
> @@ -371,8 +371,8 @@ static int ad5360_read_raw(struct iio_dev *indio_dev,
>  			   long m)
>  {
>  	struct ad5360_state *st = iio_priv(indio_dev);
> -	unsigned long scale_uv;
>  	unsigned int ofs_index;
> +	int scale_uv;
>  	int ret;
>  
>  	switch (m) {


  reply	other threads:[~2011-10-30 10:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-29  7:21 [patch] Staging: iio/dac/ad5360.c: signedness bug in Dan Carpenter
2011-10-30 10:45 ` Lars-Peter Clausen [this message]
2011-10-31 11:22   ` [patch] Staging: iio/dac/ad5360.c: signedness bug in ad5360_read_raw() Jonathan Cameron

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=4EAD2AB4.1010009@metafoo.de \
    --to=lars@metafoo.de \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=jic23@cam.ac.uk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    /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