From: sashiko-bot@kernel.org
To: "Svyatoslav Ryhel" <clamor95@gmail.com>
Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 2/3] hwmon: (emc1403) Convert to use OF bindings
Date: Fri, 31 Jul 2026 11:41:28 +0000 [thread overview]
Message-ID: <20260731114129.49F871F00ADF@smtp.kernel.org> (raw)
In-Reply-To: <20260731113007.145322-3-clamor95@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The OF match data for 'smsc,emc1402' is set to the enum value `emc1402` (0). This results in a NULL pointer, causing `device_get_match_data()` to incorrectly assume the match data is missing, which triggers an unintended fallback to `id_table` matching.
--
--- Patch [2]: [PATCH v4 2/3] hwmon: (emc1403) Convert to use OF bindings ---
Note: The standard inline diff format for this report has been altered to a
free-form summary due to automated recitation restrictions.
commit 6847b2cd06e049585ee05391183122e70ebf54a0
Author: Jonas Schwöbel <jonasschwoebel@yahoo.de>
hwmon: (emc1403) Convert to use OF bindings
This commit adds an OF match table to the emc1403 driver to enable its
use with Device Trees.
[Severity: Low]
Looking at emc1403_of_match in drivers/hwmon/emc1403.c, the .data field for
"smsc,emc1402" is cast from the enum emc1402. Since emc1402 evaluates to 0,
does this store a NULL pointer in the match data?
When emc1403_probe() calls i2c_get_match_data(client) at line 668,
device_get_match_data() will encounter this NULL pointer and assume the
match data is missing.
Will this cause the I2C subsystem to unintentionally bypass the OF match
data and fall back to string matching against the id_table?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260731113007.145322-1-clamor95@gmail.com?part=2
next prev parent reply other threads:[~2026-07-31 11:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 11:30 [PATCH v4 0/3] hwmon: emc1403: Convert to use OF bindings and add regulator support Svyatoslav Ryhel
2026-07-31 11:30 ` [PATCH v4 1/3] dt-bindings: hwmon: Document SMSC EMC1402/1403/1404/1428 Svyatoslav Ryhel
2026-07-31 11:42 ` sashiko-bot
2026-07-31 11:30 ` [PATCH v4 2/3] hwmon: (emc1403) Convert to use OF bindings Svyatoslav Ryhel
2026-07-31 11:41 ` sashiko-bot [this message]
2026-07-31 11:30 ` [PATCH v4 3/3] hwmon: (emc1403) Add regulator support Svyatoslav Ryhel
2026-07-31 11:37 ` sashiko-bot
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=20260731114129.49F871F00ADF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.