lkml.org 
[lkml]   [2014]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1 linux-next] iio: common: remove unnecessary sizeof(u8)
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;
>
>



\
 
 \ /
  Last update: 2014-11-22 03:01    [W:0.064 / U:2.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site