From: sashiko-bot@kernel.org
To: "Akhil R" <akhilrajeev@nvidia.com>
Cc: "Alexandre Belloni" <alexandre.belloni@bootlin.com>,
Frank.Li@kernel.org, linux-i3c@lists.infradead.org
Subject: Re: [PATCH 4/5] i3c: dw: Do not use OF match data as a quirk bitmask
Date: Tue, 04 Aug 2026 11:04:12 +0000 [thread overview]
Message-ID: <20260804110413.657231F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260804101301.2975911-5-akhilrajeev@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Missing error check for platform_get_irq() which breaks probe deferral.
--
--- Patch [4]: [PATCH 4/5] i3c: dw: Do not use OF match data as a quirk bitmask ---
commit b46fa3977d02ec78544c1f987ffbf99b39c47f0d
Author: Akhil R <akhilrajeev@nvidia.com>
i3c: dw: Do not use OF match data as a quirk bitmask
This commit updates dw_i3c_common_probe() to explicitly check for a match
in the driver's ACPI table instead of merely testing for an ACPI companion.
This prevents OF match data from being incorrectly cast to a quirk bitmask.
Closes: https://lore.kernel.org/all/20260728071757.5B3CD1F000E9@smtp.kernel.org/
> diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
> index 3816a50a52cc5..17e1dd4fb5f3d 100644
> --- a/drivers/i3c/master/dw-i3c-master.c
> +++ b/drivers/i3c/master/dw-i3c-master.c
[ ... ]
> @@ -1618,9 +1620,10 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
>
> master->dev = &pdev->dev;
>
> - if (has_acpi_companion(&pdev->dev)) {
> - quirks = (unsigned long)device_get_match_data(&pdev->dev);
> - } else if (pdev->dev.of_node) {
> + acpi_id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev);
> + if (acpi_id) {
> + quirks = acpi_id->driver_data;
> + } else {
> drvdata = device_get_match_data(&pdev->dev);
> if (drvdata)
> quirks = drvdata->flags;
[Severity: High]
This isn't a bug introduced by this patch, but while reviewing
dw_i3c_common_probe(), I noticed an existing issue with how the IRQ is
fetched later in the same function:
irq = platform_get_irq(pdev, 0);
ret = devm_request_irq(&pdev->dev, irq,
dw_i3c_master_irq_handler, 0,
dev_name(&pdev->dev), master);
Does this code fail to handle deferred probing properly?
If platform_get_irq() returns a negative error like -EPROBE_DEFER, it is
passed directly as the irq parameter to devm_request_irq(). Because the irq
parameter is an unsigned integer, the negative value is cast to a large
number. This causes request_threaded_irq() to reject it as out of bounds
and return -EINVAL.
Could this permanently break initialization on systems that require probe
deferral by masking the original deferral error code?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260804101301.2975911-1-akhilrajeev@nvidia.com?part=4
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
next prev parent reply other threads:[~2026-08-04 11:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 10:12 [PATCH 0/5] i3c: Fix firmware node refcounting and error paths Akhil R
2026-08-04 10:12 ` [PATCH 1/5] i3c: master: Release the fwnode of i2c boardinfo Akhil R
2026-08-04 10:33 ` sashiko-bot
2026-08-05 19:07 ` Frank Li
2026-08-04 16:53 ` Adrian Hunter
2026-08-04 10:12 ` [PATCH 2/5] i3c: master: Fix refcount of i3c fwnode Akhil R
2026-08-04 16:53 ` Adrian Hunter
2026-08-04 10:12 ` [PATCH 3/5] i3c: master: Do not release the addresses when reattach fails Akhil R
2026-08-04 17:56 ` Adrian Hunter
2026-08-04 10:13 ` [PATCH 4/5] i3c: dw: Do not use OF match data as a quirk bitmask Akhil R
2026-08-04 11:04 ` sashiko-bot [this message]
2026-08-05 19:53 ` Frank Li
2026-08-04 10:13 ` [PATCH 5/5] i3c: dw: Resume the controller before unregistering the bus Akhil R
2026-08-04 11:15 ` sashiko-bot
2026-08-05 19:57 ` Frank Li
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=20260804110413.657231F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=akhilrajeev@nvidia.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-i3c@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox