All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis CIOCCA <denis.ciocca@st.com>
To: Robin van der Gracht <robin@protonic.nl>,
	"jic23@kernel.org" <jic23@kernel.org>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH] iio: st_sensors: Fix buffer copy
Date: Fri, 3 Oct 2014 15:50:02 +0200	[thread overview]
Message-ID: <542EA98A.4070906@st.com> (raw)
In-Reply-To: <1411995607-22198-1-git-send-email-robin@protonic.nl>

Acked-by: Denis Ciocca <denis.ciocca@st.com>

Thanks!

Denis

On 09/29/14 15:00, Robin van der Gracht wrote:
> Use byte_for_channel as iterator to properly initialize the buffer.
>
> Signed-off-by: Robin van der Gracht <robin@protonic.nl>
> ---
>   drivers/iio/common/st_sensors/st_sensors_buffer.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/common/st_sensors/st_sensors_buffer.c b/drivers/iio/common/st_sensors/st_sensors_buffer.c
> index 1665c8e..e18bc67 100644
> --- a/drivers/iio/common/st_sensors/st_sensors_buffer.c
> +++ b/drivers/iio/common/st_sensors/st_sensors_buffer.c
> @@ -71,7 +71,7 @@ int st_sensors_get_buffer_element(struct iio_dev *indio_dev, u8 *buf)
>   				goto st_sensors_free_memory;
>   			}
>   
> -			for (i = 0; i < n * num_data_channels; i++) {
> +			for (i = 0; i < n * byte_for_channel; i++) {
>   				if (i < n)
>   					buf[i] = rx_array[i];
>   				else

  reply	other threads:[~2014-10-03 13:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-29 13:00 [PATCH] iio: st_sensors: Fix buffer copy Robin van der Gracht
2014-10-03 13:50 ` Denis CIOCCA [this message]
2014-10-04 11:12   ` 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=542EA98A.4070906@st.com \
    --to=denis.ciocca@st.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=robin@protonic.nl \
    /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.