From: netdev-bot+sashiko@kernel.org
To: mkl@pengutronix.de
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
linux-can@vger.kernel.org, kernel@pengutronix.de,
socketcan@hartkopp.net, dev.kurt@vandijck-laurijssen.be
Subject: Re: [PATCH net-next 08/12] can: janz-ican3: don't discard the IRQ lookup error in probe
Date: Thu, 19 Nov 2026 09:54:31 +0000 [thread overview]
Message-ID: <179508207110.3136.11792101604636296316@kernel.org> (raw)
In-Reply-To: <20261118092955.1283165-9-mkl@pengutronix.de>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit message doesn't say what users will see after the
change, and the one failure that can actually happen is now reported…
--
can: janz-ican3: don't discard the IRQ lookup error in probe
This commit changes ican3_probe() to return the error from
platform_get_irq() as is, instead of always returning -ENODEV. The commit
message says the driver is an MFD child of janz-cmodio, cannot see
-EPROBE_DEFER, and should not invent its own error code.
Link: https://patch.msgid.link/28add8d0570b72d35c65c19b2365007cf0aa15c3.1792118040.git.chaosheng.qu.linux@gmail.com
> diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c
> index 1efdd1fd8caa4..a65326b0f11e9 100644
> --- a/drivers/net/can/janz-ican3.c
> +++ b/drivers/net/can/janz-ican3.c
> @@ -1944,7 +1944,7 @@ static int ican3_probe(struct platform_device *pdev)
> /* find our IRQ number */
> mod->irq = platform_get_irq(pdev, 0);
> if (mod->irq < 0) {
> - ret = -ENODEV;
> + ret = mod->irq;
> goto out_free_ndev;
> }
[Severity: Low]
This isn't a bug, but could the commit message name the failure that can
actually happen here, and the new error code it produces?
The message says:
The probe should not invent an error code for a lookup that failed for
another reason.
cmodio_setup_subdevice() in drivers/mfd/janz-cmodio.c always gives each
child a single IRQ resource at offset 0:
res->flags = IORESOURCE_IRQ;
res->parent = NULL;
res->start = 0;
res->end = 0;
cmodio_probe_submodules() then passes the carrier PCI device's irq as
irq_base:
return mfd_add_devices(&pdev->dev, 0, priv->cells,
num_probed, NULL, pdev->irq, NULL);
So the resource is always there, and the child has no OF node. On
non-SPARC systems, the only error platform_get_irq() can return here
appears to come from platform_get_irq_affinity() when the PCI device's
irq is 0:
if (WARN(!ret, "0 is an invalid IRQ number\n"))
return -EINVAL;
Before this patch, ican3_probe() turned that into -ENODEV. It now returns
-EINVAL.
In call_driver_probe() in drivers/base/dd.c, -ENODEV and -ENXIO are only
logged with dev_dbg ("rejects match"). -EINVAL goes to the default branch
and gets a dev_err ("probe with driver ... failed with error -22"). A
sysfs bind attempt would also get -EINVAL back instead of -ENODEV. On
SPARC the lookup returns -ENXIO, which is logged the same way as -ENODEV,
so nothing changes there.
The other patches in this series describe the visible change, for
example:
A device tree without an interrupt now reports -ENXIO rather than
-ENODEV
Could a similar note be added here, saying that -EINVAL now replaces
-ENODEV when the carrier's irq is 0? The code change itself looks correct.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261118092955.1283165-2-mkl%40pengutronix.de
next prev parent reply other threads:[~2026-11-19 9:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 9:11 [PATCH net-next 0/12] pull-request: can-next 2026-11-18 Marc Kleine-Budde
2026-11-18 9:11 ` [PATCH net-next 01/12] MAINTAINERS: add entry for PEAK-System CAN drivers Marc Kleine-Budde
2026-11-18 9:38 ` netdev-bot+sinfo
2026-11-18 9:45 ` Marc Kleine-Budde
2026-11-18 9:11 ` [PATCH net-next 02/12] can: raw: remove redundant NULL check before netdev_hold() Marc Kleine-Budde
2026-11-18 9:11 ` [PATCH net-next 03/12] can: dev: remove unused safe_candev_priv() Marc Kleine-Budde
2026-11-18 9:11 ` [PATCH net-next 04/12] can: convert to DEFINE_SIMPLE_DEV_PM_OPS() Marc Kleine-Budde
2026-11-19 9:54 ` netdev-bot+sashiko
2026-11-19 11:19 ` Marc Kleine-Budde
2026-11-18 9:11 ` [PATCH net-next 05/12] can: cc770: don't discard the IRQ lookup error in probe Marc Kleine-Budde
2026-11-18 9:11 ` [PATCH net-next 06/12] can: sun4i_can: " Marc Kleine-Budde
2026-11-19 9:32 ` sashiko-bot
2026-11-19 9:37 ` Marc Kleine-Budde
2026-11-19 9:54 ` netdev-bot+sashiko
2026-11-18 9:11 ` [PATCH net-next 07/12] can: at91_can: " Marc Kleine-Budde
2026-11-19 9:54 ` netdev-bot+sashiko
2026-11-18 9:11 ` [PATCH net-next 08/12] can: janz-ican3: " Marc Kleine-Budde
2026-11-19 9:54 ` netdev-bot+sashiko [this message]
2026-11-18 9:11 ` [PATCH net-next 09/12] can: ifi_canfd: " Marc Kleine-Budde
2026-11-19 9:54 ` netdev-bot+sashiko
2026-11-18 9:11 ` [PATCH net-next 10/12] can: remove Softing CANcard driver Marc Kleine-Budde
2026-11-18 9:11 ` [PATCH net-next 11/12] can: ucan: fix repeated word 'is' in comment Marc Kleine-Budde
2026-11-18 9:11 ` [PATCH net-next 12/12] can: xilinx_can: set CAN FD flags on received frames Marc Kleine-Budde
2026-11-19 9:32 ` 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=179508207110.3136.11792101604636296316@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=davem@davemloft.net \
--cc=dev.kurt@vandijck-laurijssen.be \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=socketcan@hartkopp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox