From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Fabio Estevam <festevam@gmail.com>, Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org
Subject: Re: max1363 : Warnings from iio_sanity_check_avail_scan_masks()
Date: Tue, 29 Apr 2025 06:59:40 +0300 [thread overview]
Message-ID: <ef215ea2-e283-4c89-9b54-61b84684bfe7@gmail.com> (raw)
In-Reply-To: <CAOMZO5Bzrfu14-mzaF+EbAq=xGKMc-FGwJsx-aZd_RraH2Gscw@mail.gmail.com>
On 29/04/2025 00:16, Fabio Estevam wrote:
> On Mon, Apr 28, 2025 at 4:03 PM Fabio Estevam <festevam@gmail.com> wrote:
>>
>> Hi Jonathan,
>>
>> On Sun, Apr 27, 2025 at 7:23 AM Jonathan Cameron <jic23@kernel.org> wrote:
>>
>>> https://elixir.bootlin.com/linux/v6.14.4/source/drivers/iio/adc/max1363.c#L1460
>>> There is where they are set. Should show us if something weird is going on with
>>> what the checks are seeing vs something going wrong at the debug check.
>>
>> I am not sure if this is what you want me to print:
>
> Sorry, I should do it like this instead:
>
> --- a/drivers/iio/adc/max1363.c
> +++ b/drivers/iio/adc/max1363.c
> @@ -1453,6 +1453,9 @@ static int max1363_alloc_scan_masks(struct
> iio_dev *indio_dev)
>
> indio_dev->available_scan_masks = masks;
>
> + for (i = 0; i < st->chip_info->num_modes; i++)
> + pr_err("************ available_scan_masks is %lu\n", masks[i]);
> +
> return 0;
> }
>
> which prints:
>
> [ 1.567841] ************ available_scan_masks is 1
> [ 1.577203] ************ available_scan_masks is 2
> [ 1.582032] ************ available_scan_masks is 4
> [ 1.586837] ************ available_scan_masks is 8
> [ 1.591644] ************ available_scan_masks is 3
> [ 1.596452] ************ available_scan_masks is 7
> [ 1.601258] ************ available_scan_masks is 15
> [ 1.606149] ************ available_scan_masks is 12
Here, 12 is subset of 15.
> [ 1.611041] ************ available_scan_masks is 4096
> [ 1.616101] ************ available_scan_masks is 8192
> [ 1.616105] ************ available_scan_masks is 262144
> [ 1.616108] ************ available_scan_masks is 524288
> [ 1.640493] ************ available_scan_masks is 12288
> [ 1.645640] ************ available_scan_masks is 786432
> [ 1.652223] max1363 1-0064: available_scan_mask 8 subset of 0. Never used
> [ 1.659028] max1363 1-0064: available_scan_mask 9 subset of 0. Never used
> [ 1.665829] max1363 1-0064: available_scan_mask 10 subset of 0. Never used
> [ 1.672722] max1363 1-0064: available_scan_mask 11 subset of 0. Never used
// snip
So, majority of these prints seem to be garbage. AFAICS, we should only see:
> [ 1.652223] max1363 1-0064: available_scan_mask 8 subset of 7.
Never used
Or maybe:
available_scan_mask: mask[8] subset of mask[7]. Never used
Do you think you could send a patch to fix this, or should I take a look
at it?
Yours,
-- Matti
next prev parent reply other threads:[~2025-04-29 3:59 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 [this message]
2025-04-29 10:42 ` Fabio Estevam
2025-04-29 14:29 ` Fabio Estevam
2025-04-28 5:38 ` Matti Vaittinen
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=ef215ea2-e283-4c89-9b54-61b84684bfe7@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