From: Yury Norov <yury.norov@gmail.com>
To: "Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: ad7606_spi: use bitmap_full() in ad7606_spi_update_scan_mode()
Date: Mon, 15 Dec 2025 19:23:02 -0500 [thread overview]
Message-ID: <aUCmZk0S_tq3SOOY@yury> (raw)
In-Reply-To: <20251216001808.333053-1-yury.norov@gmail.com>
On Mon, Dec 15, 2025 at 07:18:06PM -0500, Yury Norov (NVIDIA) wrote:
> bitmap_empty() is more verbose and efficient, as it stops traversing
> scan_mask as soon as the 1st set bit found.
Ah, please read this as:
bitmap_full() is more verbose and efficient, as it stops traversing
scan_mask as soon as the 1st unset bit found.
Sorry for miswording the commit message.
> Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
> ---
> drivers/iio/adc/ad7606_spi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ad7606_spi.c b/drivers/iio/adc/ad7606_spi.c
> index f28e4ca37707..7e17ccbcedd0 100644
> --- a/drivers/iio/adc/ad7606_spi.c
> +++ b/drivers/iio/adc/ad7606_spi.c
> @@ -345,7 +345,7 @@ static int ad7606_spi_update_scan_mode(struct iio_dev *indio_dev,
> * has no way of demuxing the data to filter out unwanted
> * channels.
> */
> - if (bitmap_weight(scan_mask, num_adc_ch) != num_adc_ch)
> + if (!bitmap_full(scan_mask, num_adc_ch))
> return -EINVAL;
> }
>
> --
> 2.43.0
next prev parent reply other threads:[~2025-12-16 0:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 0:18 [PATCH] iio: adc: ad7606_spi: use bitmap_full() in ad7606_spi_update_scan_mode() Yury Norov (NVIDIA)
2025-12-16 0:23 ` Yury Norov [this message]
2025-12-16 0:26 ` David Lechner
2025-12-21 19:48 ` 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=aUCmZk0S_tq3SOOY@yury \
--to=yury.norov@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
/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