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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230930181317.2cff5d00@jic23-huawei>
Date:   Sat, 30 Sep 2023 18:13:17 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     alisadariana@...il.com
Cc:     Alisa-Dariana Roman <alisa.roman@...log.com>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Alexandru Tachici <alexandru.tachici@...log.com>,
        Michael Hennerich <Michael.Hennerich@...log.com>,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/3] iio: adc: ad7192: Use bitfield access macros

On Mon, 25 Sep 2023 00:51:46 +0300
alisadariana@...il.com wrote:

> From: Alisa-Dariana Roman <alisa.roman@...log.com>
> 
> Include bitfield.h and update driver to use bitfield access macros
> GENMASK, FIELD_PREP and FIELD_GET.
> 
> Remove old macros in favor of using FIELD_PREP and masks.
> 
> Change %d to %ld to match the type of FIELD_GET().
> 
> Signed-off-by: Alisa-Dariana Roman <alisa.roman@...log.com>
Hi Alisa-Dariana,

One more !! in here. I'll get rid of that whilst applying.

Applied to the togreg branch of iio.git.

Thanks,

Jonathan


> @@ -682,7 +682,8 @@ static int ad7192_read_raw(struct iio_dev *indio_dev,
>  			   long m)
>  {
>  	struct ad7192_state *st = iio_priv(indio_dev);
> -	bool unipolar = !!(st->conf & AD7192_CONF_UNIPOLAR);
> +	bool unipolar = !!FIELD_GET(AD7192_CONF_UNIPOLAR, st->conf);

This !! not needed.

> +	u8 gain = FIELD_GET(AD7192_CONF_GAIN_MASK, st->conf);
>  
>  	switch (m) {
>  	case IIO_CHAN_INFO_RAW:

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ