From: sashiko-bot@kernel.org
To: "Akhil R" <akhilrajeev@nvidia.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v3 10/13] i3c: dw-i3c-master: Add ACPI ID for Tegra410
Date: Fri, 24 Apr 2026 00:34:39 +0000 [thread overview]
Message-ID: <20260424003439.CEE1AC2BCAF@smtp.kernel.org> (raw)
In-Reply-To: <20260423085718.70762-11-akhilrajeev@nvidia.com>
Sashiko AI review found 1 potential issue(s):
- [High] Type mismatch when retrieving match data for ACPI devices instantiated via PRP0001 (OF compatible strings).
--
commit 333ca78106137e8c6bbf34e1b45a4801fdfbbebe
Author: Akhil R <akhilrajeev@nvidia.com>
i3c: dw-i3c-master: Add ACPI ID for Tegra410
Update variable names to generic names and add Tegra410 ACPI ID to
support the I3C controller in Tegra410, which is a DesignWare I3C host
controller.
> diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
> index b90756ade2db6d..e63822df2ae48e 100644
> --- a/drivers/i3c/master/dw-i3c-master.c
> +++ b/drivers/i3c/master/dw-i3c-master.c
> @@ -1847,11 +1847,12 @@ static const struct of_device_id dw_i3c_master_of_match[] = {
> };
> MODULE_DEVICE_TABLE(of, dw_i3c_master_of_match);
>
> -static const struct acpi_device_id amd_i3c_device_match[] = {
> +static const struct acpi_device_id dw_i3c_master_acpi_match[] = {
> { "AMDI0015", AMD_I3C_OD_PP_TIMING },
> + { "NVDA2018", DW_I3C_ACPI_SKIP_CLK_RST },
> { }
> };
This isn't a regression from this commit, but I noticed a potential issue
with how ACPI match data is extracted in dw_i3c_common_probe():
drivers/i3c/master/dw-i3c-master.c:dw_i3c_common_probe() {
...
if (has_acpi_companion(&pdev->dev)) {
quirks = (unsigned long)device_get_match_data(&pdev->dev);
} else if (pdev->dev.of_node) {
drvdata = device_get_match_data(&pdev->dev);
if (drvdata)
quirks = drvdata->flags;
}
...
}
If an ACPI device is instantiated using the standard PRP0001 mechanism, it
maps to OF compatible strings like "altr,agilex5-dw-i3c-master". In this
scenario, has_acpi_companion() evaluates to true, but device_get_match_data()
will return the pointer to altr_agilex5_drvdata from the OF match table.
Could this direct cast of the pointer to an unsigned long bitmask cause
unintended quirk flags to be interpreted as true depending on memory layout?
Would it be safer to unify the match data format to always use struct
pointers?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260423085718.70762-1-akhilrajeev@nvidia.com?part=10
next prev parent reply other threads:[~2026-04-24 0:34 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 8:56 [PATCH v3 00/13] Support ACPI and SETAASA device discovery Akhil R
2026-04-23 8:57 ` [PATCH v3 01/13] dt-bindings: i3c: Add mipi-i3c-static-method to support SETAASA Akhil R
2026-04-23 11:23 ` sashiko-bot
2026-05-05 21:32 ` Rob Herring
2026-05-05 22:17 ` Guenter Roeck
2026-05-05 23:12 ` Rob Herring
2026-04-23 8:57 ` [PATCH v3 02/13] ACPICA: Read LVR from the I2C resource descriptor Akhil R
2026-04-23 19:35 ` sashiko-bot
2026-04-23 8:57 ` [PATCH v3 03/13] i3c: master: Use unified device property interface Akhil R
2026-04-23 20:08 ` sashiko-bot
2026-04-23 8:57 ` [PATCH v3 04/13] i3c: master: Support ACPI enumeration of child devices Akhil R
2026-04-23 22:11 ` sashiko-bot
2026-04-23 8:57 ` [PATCH v3 05/13] i3c: master: Add support for devices using SETAASA Akhil R
2026-04-23 22:36 ` sashiko-bot
2026-04-23 8:57 ` [PATCH v3 06/13] i3c: master: Add support for devices without PID Akhil R
2026-04-23 23:01 ` sashiko-bot
2026-04-23 8:57 ` [PATCH v3 07/13] i3c: master: match I3C device through DT and ACPI Akhil R
2026-04-23 23:27 ` sashiko-bot
2026-04-23 8:57 ` [PATCH v3 08/13] i3c: dw-i3c-master: Add SETAASA as supported CCC Akhil R
2026-04-23 8:57 ` [PATCH v3 09/13] i3c: dw-i3c-master: Add a quirk to skip clock and reset Akhil R
2026-04-24 0:18 ` sashiko-bot
2026-04-23 8:57 ` [PATCH v3 10/13] i3c: dw-i3c-master: Add ACPI ID for Tegra410 Akhil R
2026-04-24 0:34 ` sashiko-bot [this message]
2026-04-23 8:57 ` [PATCH v3 11/13] hwmon: spd5118: Remove 16-bit addressing Akhil R
2026-04-24 1:03 ` sashiko-bot
2026-04-23 8:57 ` [PATCH v3 12/13] hwmon: spd5118: Add I3C support Akhil R
2026-04-24 3:08 ` sashiko-bot
2026-04-23 8:57 ` [PATCH v3 13/13] arm64: defconfig: Enable I3C and SPD5118 hwmon Akhil R
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=20260424003439.CEE1AC2BCAF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=akhilrajeev@nvidia.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=sashiko@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox