From: Jonathan Cameron <jic23@kernel.org>
To: Nuno Sa via B4 Relay <devnull+nuno.sa.analog.com@kernel.org>
Cc: nuno.sa@analog.com, linux-iio@vger.kernel.org,
Lars-Peter Clausen <lars@metafoo.de>,
Andreas Klinger <ak@it-klinger.de>,
Song Qiang <songqiang1304521@gmail.com>
Subject: Re: [PATCH 03/22] iio: adc: hx711: make use of iio_for_each_active_channel()
Date: Sat, 20 Jul 2024 17:01:42 +0100 [thread overview]
Message-ID: <20240720170142.6d2c2070@jic23-huawei> (raw)
In-Reply-To: <20240718-dev-iio-masklength-private2-v1-3-8e12cd042906@analog.com>
On Thu, 18 Jul 2024 15:37:49 +0200
Nuno Sa via B4 Relay <devnull+nuno.sa.analog.com@kernel.org> wrote:
> From: Nuno Sa <nuno.sa@analog.com>
>
> Use iio_for_each_active_channel() to iterate over active channels
> accessing '.masklength' so it can be annotated as __private when there are
> no more direct users of it.
>
> Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Even before this work from you, this code could certainly have been
less contrary!
Applied.
> ---
> drivers/iio/adc/hx711.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/iio/adc/hx711.c b/drivers/iio/adc/hx711.c
> index b3372ccff7d5..376f4e02de97 100644
> --- a/drivers/iio/adc/hx711.c
> +++ b/drivers/iio/adc/hx711.c
> @@ -363,10 +363,7 @@ static irqreturn_t hx711_trigger(int irq, void *p)
>
> memset(hx711_data->buffer, 0, sizeof(hx711_data->buffer));
>
> - for (i = 0; i < indio_dev->masklength; i++) {
> - if (!test_bit(i, indio_dev->active_scan_mask))
> - continue;
> -
> + iio_for_each_active_channel(indio_dev, i) {
> hx711_data->buffer[j] = hx711_reset_read(hx711_data,
> indio_dev->channels[i].channel);
> j++;
>
next prev parent reply other threads:[~2024-07-20 16:01 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 13:37 [PATCH 00/22] iio: make masklength __private (round 2) Nuno Sa via B4 Relay
2024-07-18 13:37 ` [PATCH 01/22] iio: adc: cc10001_adc: make use of iio_for_each_active_channel() Nuno Sa via B4 Relay
2024-07-20 15:59 ` Jonathan Cameron
2024-07-18 13:37 ` [PATCH 02/22] iio: adc: dln2-adc: use new '.masklength' accessors Nuno Sa via B4 Relay
2024-07-20 16:00 ` Jonathan Cameron
2024-07-18 13:37 ` [PATCH 03/22] iio: adc: hx711: make use of iio_for_each_active_channel() Nuno Sa via B4 Relay
2024-07-20 16:01 ` Jonathan Cameron [this message]
2024-07-18 13:37 ` [PATCH 04/22] iio: dummy: iio_simple_dummy_buffer: use iio_for_each_active_channel() Nuno Sa via B4 Relay
2024-07-20 16:02 ` Jonathan Cameron
2024-07-18 13:37 ` [PATCH 05/22] iio: health: afe4403: make use of iio_for_each_active_channel() Nuno Sa via B4 Relay
2024-07-20 16:03 ` Jonathan Cameron
2024-07-18 13:37 ` [PATCH 06/22] iio: health: max30102: make use of iio_get_masklength() Nuno Sa via B4 Relay
2024-07-20 16:04 ` Jonathan Cameron
2024-07-18 13:37 ` [PATCH 07/22] iio: health: afe4404: make use of iio_for_each_active_channel() Nuno Sa via B4 Relay
2024-07-20 16:05 ` Jonathan Cameron
2024-07-18 13:37 ` [PATCH 08/22] iio: humidity: am2315: " Nuno Sa via B4 Relay
2024-07-18 13:37 ` [PATCH 09/22] iio: imu: bmi160_core: " Nuno Sa via B4 Relay
2024-07-18 13:37 ` [PATCH 10/22] iio: imu: bno055: make use of iio_get_masklength() Nuno Sa via B4 Relay
2024-07-18 13:37 ` [PATCH 11/22] iio: imu: kmx61: make use of iio_for_each_active_channel() Nuno Sa via B4 Relay
2024-07-18 13:37 ` [PATCH 12/22] iio: light: adjd_s311: " Nuno Sa via B4 Relay
2024-07-18 13:37 ` [PATCH 13/22] iio: light: gp2ap020a00f: " Nuno Sa via B4 Relay
2024-07-18 13:38 ` [PATCH 14/22] iio: light: isl29125: " Nuno Sa via B4 Relay
2024-07-18 13:38 ` [PATCH 15/22] iio: light: si1145: use new '.masklength' accessors Nuno Sa via B4 Relay
2024-07-18 13:38 ` [PATCH 16/22] iio: light: tcs3414: make use of iio_for_each_active_channel() Nuno Sa via B4 Relay
2024-07-18 13:38 ` [PATCH 17/22] iio: light: tcs3472: " Nuno Sa via B4 Relay
2024-07-18 13:38 ` [PATCH 18/22] iio: magnetometer: rm3100-core: make use of iio_get_masklength() Nuno Sa via B4 Relay
2024-07-18 13:38 ` [PATCH 19/22] iio: pressure: dlhl60d: make use of iio_for_each_active_channel() Nuno Sa via B4 Relay
2024-07-18 13:38 ` [PATCH 20/22] iio: proximity: hx9023s: " Nuno Sa via B4 Relay
2024-07-18 13:38 ` [PATCH 21/22] iio: proximity: sx9500: " Nuno Sa via B4 Relay
2024-07-18 13:38 ` [PATCH 22/22] iio: proximity: sx_common: " Nuno Sa via B4 Relay
2024-07-20 16:14 ` Jonathan Cameron
2024-07-20 15:58 ` [PATCH 00/22] iio: make masklength __private (round 2) 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=20240720170142.6d2c2070@jic23-huawei \
--to=jic23@kernel.org \
--cc=ak@it-klinger.de \
--cc=devnull+nuno.sa.analog.com@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=songqiang1304521@gmail.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