From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
linux-iio@vger.kernel.org,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Shen Jianping" <Jianping.Shen@de.bosch.com>
Subject: Re: [PATCH RFT] iio: Fix core buffer demux failure to account for unwanted channels at tail
Date: Wed, 6 Aug 2025 16:40:25 +0100 [thread overview]
Message-ID: <20250806164025.000052f6@huawei.com> (raw)
In-Reply-To: <CAHp75VeH2R28=kVQcVGOZTZ0wGTtHB_1AmhnwVUofcOsT2g8mw@mail.gmail.com>
On Mon, 4 Aug 2025 14:52:23 +0200
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Mon, Aug 4, 2025 at 12:48 PM Jonathan Cameron
> <Jonathan.Cameron@huawei.com> wrote:
> > On Sun, 3 Aug 2025 21:46:50 +0200
> > Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> > > On Sat, Aug 2, 2025 at 7:15 PM Jonathan Cameron <jic23@kernel.org> wrote:
>
> ...
>
> > > > + /* Walk remaining bits of active_scan_mask */
> > > > + in_ind = find_next_bit(indio_dev->active_scan_mask, masklength,
> > > > + in_ind + 1);
> > > > + while (in_ind != masklength) {
> > >
> > > for_each_set_bit_from() ?
> >
> > Would work but then takes the style away from the code above that this
> > effectively duplicates. I'd need to have a closer look to see if we
> > can potentially convert that as well. I don't want two very different
> > looking bits of code effectively doing the same thing under subtly
> > different constraints.
>
> I see. But can we have this as a fix followed by the conversion patch
> in one series, so we won't forget about that?
Maybe. This is a nasty bug so I'm not sure I want to delay the fix
whilst I work out how to cleanup the section above.
I'll see if I can find time to work on this. The time is mostly on
building test cases rather than the code.
>
> > > > + ret = iio_storage_bytes_for_si(indio_dev, in_ind);
> > > > + if (ret < 0)
> > > > + goto error_clear_mux_table;
> > > > +
> > > > + length = ret;
> > > > + /* Make sure we are aligned */
> > > > + in_loc = roundup(in_loc, length) + length;
> > > > + in_ind = find_next_bit(indio_dev->active_scan_mask,
> > > > + masklength, in_ind + 1);
> > > > + }
>
>
next prev parent reply other threads:[~2025-08-06 15:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-02 17:15 [PATCH RFT] iio: Fix core buffer demux failure to account for unwanted channels at tail Jonathan Cameron
2025-08-03 19:46 ` Andy Shevchenko
2025-08-04 10:48 ` Jonathan Cameron
2025-08-04 12:52 ` Andy Shevchenko
2025-08-06 15:40 ` Jonathan Cameron [this message]
2025-08-04 15:38 ` Nuno Sá
2025-08-04 16:02 ` Andy Shevchenko
2025-08-05 8:16 ` Nuno Sá
2025-08-05 12:41 ` Andy Shevchenko
2025-08-06 15:36 ` Jonathan Cameron
2025-08-11 9:54 ` Nuno Sá
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=20250806164025.000052f6@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=Jianping.Shen@de.bosch.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.