From: Flaviu Nistor <flaviu.nistor@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>, Jean Delvare <jdelvare@suse.com>
Cc: Flaviu Nistor <flaviu.nistor@gmail.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2] hwmon: (lm90) Switch channel parsing to fwnode APIs
Date: Fri, 17 Jul 2026 11:00:27 +0300 [thread overview]
Message-ID: <20260717080027.8370-1-flaviu.nistor@gmail.com> (raw)
In-Reply-To: <20260717070614.6492-1-flaviu.nistor@gmail.com>
On Fri, 17 Jul 2026 10:06, Flaviu Nistor wrote
>On Fri, 17 Jul 2026 09:49, sashiko-bot wrote:
>>Thank you for your contribution! Sashiko AI review found 2 potential issue(=
>>s) to consider:
>>
>>New issues:
>>- [Low] Incompatible pointer type causing build failure
>>
>>Pre-existing issues:
>>- [Critical] Sysfs read triggers NULL pointer dereference via uninitialized=
>> hwmon_dev
>>--
>>
>>--- Patch [1]: [PATCH v2] hwmon: (lm90) Switch channel parsing to fwnode AP=
>>Is ---
>>commit 3d5d792e5529b3545ccefc21f7dfd9c2acecc999
>>Author: Flaviu Nistor <flaviu.nistor@gmail.com>
>>
>>hwmon: (lm90) Switch channel parsing to fwnode APIs
>> =20
>>This commit replaces OF property handling with fwnode APIs in the probe
>>function to read channel properties. This improves compatibility by no long=
>>er
>>limiting it to Device Tree.
>>
>>Link: https://lore.kernel.org/all/20260713190659.4511-1-flaviu.nistor@gmail=
>>.com/
>>
>>> diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
>>> index 4b9c0ccdf2609..7d4b8e61bec51 100644
>>> --- a/drivers/hwmon/lm90.c
>>> +++ b/drivers/hwmon/lm90.c
>>[ ... ]
>>> @@ -2701,27 +2701,27 @@ static int lm90_probe_channel_from_dt(struct i2c_=
>>client *client,
>>[ ... ]
>>> -=09err =3D of_property_read_s32(child, "temperature-offset-millicelsius"=
>>>, &val);
>>> +=09err =3D fwnode_property_read_u32(child, "temperature-offset-millicels=
>>ius", &val);
>>
>>[Severity: Low]
>>Will this cause a build failure or compiler warning?
>>
>>In lm90_probe_channel(), val is declared as an s32, but it is being passed
>>to fwnode_property_read_u32() which expects a u32 pointer. This pointer typ=
>>e
>>mismatch can trigger a -Wincompatible-pointer-types error in modern builds.
>
>This is absolutely true and I can't understand how this got into the patch since
>I have test is. I will send a v3 correcting s32 to u32.
>Sorry for this!
>
>Best regards,
>Flaviu
>
I have double checked and there is no warning or error when building the driver.
Please ignore my previews reply as v2 can be used. I had in mind something different
and it looks like not a great morning start. I am sorry for the noise on the mailing list.
Best regards,
Flaviu
next prev parent reply other threads:[~2026-07-17 8:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 6:37 [PATCH v2] hwmon: (lm90) Switch channel parsing to fwnode APIs Flaviu Nistor
2026-07-17 6:49 ` sashiko-bot
2026-07-17 7:06 ` Flaviu Nistor
2026-07-17 8:00 ` Flaviu Nistor [this message]
2026-07-17 16:18 ` Guenter Roeck
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=20260717080027.8370-1-flaviu.nistor@gmail.com \
--to=flaviu.nistor@gmail.com \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
/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.