From: David Lechner <dlechner@baylibre.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Mathieu Othacehe" <othacehe@gnu.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH v2] iio: proximity: isl29501: fix buffered read on big-endian systems
Date: Fri, 5 Sep 2025 14:29:31 -0500 [thread overview]
Message-ID: <57fa4ea0-36eb-4e1d-981d-7b2a1178c84b@baylibre.com> (raw)
In-Reply-To: <20250724120329.671dc192@jic23-huawei>
On 7/24/25 6:03 AM, Jonathan Cameron wrote:
> On Tue, 22 Jul 2025 15:54:21 -0500
> David Lechner <dlechner@baylibre.com> wrote:
>
>> Fix passing a u32 value as a u16 buffer scan item. This works on little-
>> endian systems, but not on big-endian systems.
>>
>> A new local variable is introduced for getting the register value and
>> the array is changed to a struct to make the data layout more explicit
>> rather than just changing the type and having to recalculate the proper
>> length needed for the timestamp.
>>
>> Fixes: 1c28799257bc ("iio: light: isl29501: Add support for the ISL29501 ToF sensor.")
>> Signed-off-by: David Lechner <dlechner@baylibre.com>
> ok. This probably is the best minimal fix but there is a bunch of other type
> confusion around this in the driver (not as far as I can see actual bugs though).
>
> Might be good to circle back and make the val parameter of isl29501_register_read()
> a u16 as a follow up.
There are a lot of places where *val from isl29501_read_raw() is being passed
straight through to isl29501_register_read(), so we would have to add more
temporary variables to handle this. Not sure if it is worth it.
>
> Applied to my temporary fixes-togreg-for-6.17 branch on iio.git and marked
> for stable.
>
> Thanks,
>
> Jonathan
>
next prev parent reply other threads:[~2025-09-05 19:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-22 20:54 David Lechner
2025-07-24 11:03 ` Jonathan Cameron
2025-09-05 19:29 ` David Lechner [this message]
2025-08-29 9:47 ` Geert Uytterhoeven
2025-08-29 13:24 ` Andy Shevchenko
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=57fa4ea0-36eb-4e1d-981d-7b2a1178c84b@baylibre.com \
--to=dlechner@baylibre.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=andy@kernel.org \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=othacehe@gnu.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
all inboxes | Powered by JetHome®