The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Hartmut Knaack <knaack.h@gmx.de>
To: Fabian Frederick <fabf@skynet.be>, linux-kernel@vger.kernel.org
Cc: Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH 1/1 linux-next] iio: common: remove unnecessary sizeof(u8)
Date: Sat, 22 Nov 2014 02:26:10 +0100	[thread overview]
Message-ID: <546FE632.6020803@gmx.de> (raw)
In-Reply-To: <1416141204-19989-1-git-send-email-fabf@skynet.be>

Fabian Frederick schrieb am 16.11.2014 13:33:
> sizeof(u8) is always 1.
> 
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
> ---
>  drivers/iio/common/st_sensors/st_sensors_spi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/common/st_sensors/st_sensors_spi.c b/drivers/iio/common/st_sensors/st_sensors_spi.c
> index 78a6a1a..5b37737 100644
> --- a/drivers/iio/common/st_sensors/st_sensors_spi.c
> +++ b/drivers/iio/common/st_sensors/st_sensors_spi.c
> @@ -54,7 +54,7 @@ static int st_sensors_spi_read(struct st_sensor_transfer_buffer *tb,
>  	if (err)
>  		goto acc_spi_read_error;
>  
> -	memcpy(data, tb->rx_buf, len*sizeof(u8));
> +	memcpy(data, tb->rx_buf, len);
>  	mutex_unlock(&tb->buf_lock);
>  	return len;
>  
> 


  reply	other threads:[~2014-11-22  1:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-16 12:33 [PATCH 1/1 linux-next] iio: common: remove unnecessary sizeof(u8) Fabian Frederick
2014-11-22  1:26 ` Hartmut Knaack [this message]
2014-11-22 12:07   ` 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=546FE632.6020803@gmx.de \
    --to=knaack.h@gmx.de \
    --cc=fabf@skynet.be \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox