All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: Peter Meerwald <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH 1/3] iio staging: fix trigger handler of iio_simple_dummy driver
Date: Fri, 22 Jun 2012 08:38:44 +0100	[thread overview]
Message-ID: <4FE42104.3030201@cam.ac.uk> (raw)
In-Reply-To: <1340312559-32753-1-git-send-email-pmeerw@pmeerw.net>

On 6/21/2012 10:02 PM, Peter Meerwald wrote:
> accessing first and last channel fails:
> fakedata[0] is never accessed, out-of-bound access for last channel
oops. Strange I never spotted this whilst testing.  Ah well, one of 
those wierd ones!
>
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
> ---
>   drivers/staging/iio/iio_simple_dummy_buffer.c |    4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/iio/iio_simple_dummy_buffer.c b/drivers/staging/iio/iio_simple_dummy_buffer.c
> index fa4939c..d911960 100644
> --- a/drivers/staging/iio/iio_simple_dummy_buffer.c
> +++ b/drivers/staging/iio/iio_simple_dummy_buffer.c
> @@ -75,9 +75,9 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, void *p)
>   		for (i = 0, j = 0;
>   		     i < bitmap_weight(indio_dev->active_scan_mask,
>   				       indio_dev->masklength);
> -		     i++) {
> +		     i++, j++) {
>   			j = find_next_bit(buffer->scan_mask,
> -					  indio_dev->masklength, j + 1);
> +					  indio_dev->masklength, j);
>   			/* random access read from the 'device' */
>   			data[i] = fakedata[j];
>   			len += 2;
>



  parent reply	other threads:[~2012-06-22  7:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21 21:02 [PATCH 1/3] iio staging: fix trigger handler of iio_simple_dummy driver Peter Meerwald
2012-06-21 21:02 ` [PATCH 2/3] iio staging: simplify timestamp alignment in iio_simple_dummy Peter Meerwald
2012-06-22  7:36   ` Jonathan Cameron
2012-06-21 21:02 ` [PATCH 3/3] iio staging: fix typo, improve timestamp alignment comment Peter Meerwald
2012-06-22  7:39   ` Jonathan Cameron
2012-06-22  7:38 ` Jonathan Cameron [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-06-22  7:47 [PATCH 1/3] iio staging: fix trigger handler of iio_simple_dummy driver Peter Meerwald

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=4FE42104.3030201@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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.