From: Jonathan Cameron <jic23@kernel.org>
To: Fabio Estevam <festevam@gmail.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
mazziesaccount@gmail.com, linux-iio@vger.kernel.org,
Fabio Estevam <festevam@denx.de>,
stable@vger.kernel.org
Subject: Re: [PATCH 1/2] iio: Fix scan mask subset check logic
Date: Sun, 4 May 2025 18:06:00 +0100 [thread overview]
Message-ID: <20250504180600.66269584@jic23-huawei> (raw)
In-Reply-To: <CAOMZO5Bbpiz=xMKxEe93dNOkO2CLT-nhVd1SR_rvjOYNzn4wHw@mail.gmail.com>
On Sat, 3 May 2025 09:02:58 -0300
Fabio Estevam <festevam@gmail.com> wrote:
> On Wed, Apr 30, 2025 at 4:37 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> > I have applied your suggestion.
> >
> > Please take a look and let me know your thoughts.
> >
> > --- a/drivers/iio/adc/max1363.c
> > +++ b/drivers/iio/adc/max1363.c
> > @@ -504,10 +504,10 @@ static const struct iio_event_spec max1363_events[] = {
> > MAX1363_CHAN_U(1, _s1, 1, bits, ev_spec, num_ev_spec), \
> > MAX1363_CHAN_U(2, _s2, 2, bits, ev_spec, num_ev_spec), \
> > MAX1363_CHAN_U(3, _s3, 3, bits, ev_spec, num_ev_spec), \
> > - MAX1363_CHAN_B(0, 1, d0m1, 4, bits, ev_spec, num_ev_spec), \
> > - MAX1363_CHAN_B(2, 3, d2m3, 5, bits, ev_spec, num_ev_spec), \
> > - MAX1363_CHAN_B(1, 0, d1m0, 6, bits, ev_spec, num_ev_spec), \
> > - MAX1363_CHAN_B(3, 2, d3m2, 7, bits, ev_spec, num_ev_spec), \
> > + MAX1363_CHAN_B(0, 1, d0m1, 12, bits, ev_spec, num_ev_spec), \
> > + MAX1363_CHAN_B(2, 3, d2m3, 13, bits, ev_spec, num_ev_spec), \
> > + MAX1363_CHAN_B(1, 0, d1m0, 14, bits, ev_spec, num_ev_spec), \
> > + MAX1363_CHAN_B(3, 2, d3m2, 15, bits, ev_spec, num_ev_spec), \
> > IIO_CHAN_SOFT_TIMESTAMP(8) \
>
> I have also tried changing it like this:
>
> --- a/drivers/iio/adc/max1363.c
> +++ b/drivers/iio/adc/max1363.c
> @@ -504,10 +504,10 @@ static const struct iio_event_spec max1363_events[] = {
> MAX1363_CHAN_U(1, _s1, 1, bits, ev_spec, num_ev_spec), \
> MAX1363_CHAN_U(2, _s2, 2, bits, ev_spec, num_ev_spec), \
> MAX1363_CHAN_U(3, _s3, 3, bits, ev_spec, num_ev_spec), \
> - MAX1363_CHAN_B(0, 1, d0m1, 4, bits, ev_spec, num_ev_spec), \
> - MAX1363_CHAN_B(2, 3, d2m3, 5, bits, ev_spec, num_ev_spec), \
> - MAX1363_CHAN_B(1, 0, d1m0, 6, bits, ev_spec, num_ev_spec), \
> - MAX1363_CHAN_B(3, 2, d3m2, 7, bits, ev_spec, num_ev_spec), \
> + MAX1363_CHAN_B(0, 1, d0m1, 28, bits, ev_spec, num_ev_spec), \
> + MAX1363_CHAN_B(2, 3, d2m3, 29, bits, ev_spec, num_ev_spec), \
> + MAX1363_CHAN_B(1, 0, d1m0, 30, bits, ev_spec, num_ev_spec), \
> + MAX1363_CHAN_B(3, 2, d3m2, 31, bits, ev_spec, num_ev_spec), \
> IIO_CHAN_SOFT_TIMESTAMP(8) \
> }
>
> In this case, the warnings are gone.
>
> Should the masks be 32-bit?
Their depth depends on particular channels but is between 18 and 24
(assuming I'm finally reading the tables right!)
Jonathan
>
> Thanks
next prev parent reply other threads:[~2025-05-04 17:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 15:02 [PATCH 1/2] iio: Fix scan mask subset check logic Fabio Estevam
2025-04-29 15:02 ` [PATCH 2/2] iio: adc: max1363: Reorder max11607_mode_list[] Fabio Estevam
2025-04-29 17:35 ` Jonathan Cameron
2025-04-29 18:37 ` Fabio Estevam
2025-04-29 17:33 ` [PATCH 1/2] iio: Fix scan mask subset check logic Jonathan Cameron
2025-04-29 18:33 ` Fabio Estevam
2025-04-29 19:05 ` Fabio Estevam
2025-04-30 13:11 ` Jonathan Cameron
2025-04-30 13:26 ` Fabio Estevam
2025-04-30 17:25 ` Jonathan Cameron
2025-04-30 19:37 ` Fabio Estevam
2025-05-03 12:02 ` Fabio Estevam
2025-05-04 17:06 ` Jonathan Cameron [this message]
2025-05-04 17:04 ` Jonathan Cameron
2025-05-05 14:24 ` Fabio Estevam
2025-05-05 15:16 ` Jonathan Cameron
2025-05-08 13:29 ` Fabio Estevam
2025-05-08 19:05 ` 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=20250504180600.66269584@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=festevam@denx.de \
--cc=festevam@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=mazziesaccount@gmail.com \
--cc=stable@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