Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: alisadariana@gmail.com
Cc: Alisa-Dariana Roman <alisa.roman@analog.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Alexandru Tachici <alexandru.tachici@analog.com>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/3] iio: adc: ad7192: Use bitfield access macros
Date: Sat, 30 Sep 2023 18:13:17 +0100	[thread overview]
Message-ID: <20230930181317.2cff5d00@jic23-huawei> (raw)
In-Reply-To: <20230924215148.102491-2-alisadariana@gmail.com>

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

> From: Alisa-Dariana Roman <alisa.roman@analog.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@analog.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:

  reply	other threads:[~2023-09-30 17:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-24 21:51 [PATCH v3 0/3] iio: adc: ad7192: Add improvements and feature alisadariana
2023-09-24 21:51 ` [PATCH v3 1/3] iio: adc: ad7192: Use bitfield access macros alisadariana
2023-09-30 17:13   ` Jonathan Cameron [this message]
2023-09-24 21:51 ` [PATCH v3 2/3] iio: adc: ad7192: Improve f_order computation alisadariana
2023-09-30 17:25   ` Jonathan Cameron
2023-09-24 21:51 ` [PATCH v3 3/3] iio: adc: ad7192: Add fast settling support alisadariana
2023-09-30 17:31   ` 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=20230930181317.2cff5d00@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=alexandru.tachici@analog.com \
    --cc=alisa.roman@analog.com \
    --cc=alisadariana@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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