From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>, Fabio Estevam <festevam@gmail.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: max1363 : Warnings from iio_sanity_check_avail_scan_masks()
Date: Mon, 28 Apr 2025 08:38:30 +0300 [thread overview]
Message-ID: <de99d175-a571-43a0-b254-606ba03948aa@gmail.com> (raw)
In-Reply-To: <20250426160009.161b9f08@jic23-huawei>
Hi deee Ho peeps!
On 26/04/2025 18:00, Jonathan Cameron wrote:
> On Wed, 23 Apr 2025 17:23:28 -0300
> Fabio Estevam <festevam@gmail.com> wrote:
>> After upgrading the kernel from 6.1 to 6.12 (also tested with
>> linux-next), I started seeing the following warnings on a board
>> populated with a Maxim MAX11601 ADC:
>>
>> [ 1.554029] max1363 1-0064: available_scan_mask 8 subset of 0. Never used
>> [ 1.563627] max1363 1-0064: available_scan_mask 9 subset of 0. Never used
>>
>> What is the correct way to fix these warnings?
>
> Ah. I think we have an order of modes bug.. Later entries should never be a subset
> of earlier ones and we only recently added a sanity check on that.
This indeed rings a bell :) I have nothing really to add to the answers
by Jonathan, but I just noticed the warning print isn't as clear as it
could. As far as I understand, the printed values aren't the actual
masks, but indexes in the mask arrays. Now that I had this stuff
forgotten, I was puzzled by the print until I read the code.
I believe it'd be more informative if we printed the actual bit masks -
but I am not sure if we know the size of the mask. If we keep printing
the indexes, then we might want to add brackets [] to indicate the value
is an index? How about:
"available_scan_masks: mask[8] subset of mask[0]. Never used"
instead of:
available_scan_mask 8 subset of 0. Never used
Would that be more obvious?
Yours,
-- Matti
next prev parent reply other threads:[~2025-04-28 5:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 20:23 max1363 : Warnings from iio_sanity_check_avail_scan_masks() Fabio Estevam
2025-04-26 15:00 ` Jonathan Cameron
2025-04-26 21:00 ` Fabio Estevam
2025-04-27 10:23 ` Jonathan Cameron
2025-04-28 19:03 ` Fabio Estevam
2025-04-28 21:16 ` Fabio Estevam
2025-04-29 3:59 ` Matti Vaittinen
2025-04-29 10:42 ` Fabio Estevam
2025-04-29 14:29 ` Fabio Estevam
2025-04-28 5:38 ` Matti Vaittinen [this message]
2025-04-28 19:04 ` Fabio Estevam
2025-04-29 3:50 ` Matti Vaittinen
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=de99d175-a571-43a0-b254-606ba03948aa@gmail.com \
--to=mazziesaccount@gmail.com \
--cc=festevam@gmail.com \
--cc=jic23@kernel.org \
--cc=linux-iio@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