Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1380733 > unrolled thread

Re: [PATCH V3 26/29] iio: use parity32 in adxrs450

Started byJonathan Cameron <jic23@kernel.org>
First post2016-04-17 13:40 +0200
Last post2016-04-17 13:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH V3 26/29] iio: use parity32 in adxrs450 Jonathan Cameron <jic23@kernel.org> - 2016-04-17 13:40 +0200

#1380733 — Re: [PATCH V3 26/29] iio: use parity32 in adxrs450

FromJonathan Cameron <jic23@kernel.org>
Date2016-04-17 13:40 +0200
SubjectRe: [PATCH V3 26/29] iio: use parity32 in adxrs450
Message-ID<roTdB-3wJ-131@gated-at.bofh.it>
On 14/04/16 04:12, zengzhaoxiu@163.com wrote:
> From: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com>
> 
> Signed-off-by: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>

I did ack the previous version and this seems unchanged,
so please do pick up those Acks and carry them with the
series and it makes it obvious when reviewers need to look
again!

Jonathan
> ---
>  drivers/iio/gyro/adxrs450.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/gyro/adxrs450.c b/drivers/iio/gyro/adxrs450.c
> index a330d42..307f55b 100644
> --- a/drivers/iio/gyro/adxrs450.c
> +++ b/drivers/iio/gyro/adxrs450.c
> @@ -109,7 +109,7 @@ static int adxrs450_spi_read_reg_16(struct iio_dev *indio_dev,
>  	mutex_lock(&st->buf_lock);
>  	tx = ADXRS450_READ_DATA | (reg_address << 17);
>  
> -	if (!(hweight32(tx) & 1))
> +	if (!parity32(tx))
>  		tx |= ADXRS450_P;
>  
>  	st->tx = cpu_to_be32(tx);
> @@ -145,7 +145,7 @@ static int adxrs450_spi_write_reg_16(struct iio_dev *indio_dev,
>  	mutex_lock(&st->buf_lock);
>  	tx = ADXRS450_WRITE_DATA | (reg_address << 17) | (val << 1);
>  
> -	if (!(hweight32(tx) & 1))
> +	if (!parity32(tx))
>  		tx |= ADXRS450_P;
>  
>  	st->tx = cpu_to_be32(tx);
> 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web