lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 10 Apr 2016 15:37:42 +0100
From:	Jonathan Cameron <jic23@...nel.org>
To:	zengzhaoxiu@....com, lars@...afoo.de, Michael.Hennerich@...log.com,
	knaack.h@....de, pmeerw@...erw.net
Cc:	linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
	Zhaoxiu Zeng <zhaoxiu.zeng@...il.com>
Subject: Re: [PATCH v2 27/30] iio: use parity32 in adxrs450

On 06/04/16 11:16, zengzhaoxiu@....com wrote:
> From: Zhaoxiu Zeng <zhaoxiu.zeng@...il.com>
> 
> Signed-off-by: Zhaoxiu Zeng <zhaoxiu.zeng@...il.com>
Applied to the togreg branch of iio.git as you seem to have addressed
Lars' comments.

Thanks,

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);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ