Article View: linux.kernel.netdev
Article #19079Re: [PATCH net-next 08/12] can: janz-ican3: don't discard the IRQ lookup error in probe
From: netdev-bot+sashiko
Date: Thu, 19 Nov 2026 09:54
Date: Thu, 19 Nov 2026 09:54
86 lines
10872 bytes
10872 bytes
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
Technical Details
Message-ID:
<179508207110.3136.11792101604636296316@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366919-linux-kernel-netdev=dewy.ruReferences:
<20261118092955.1283165-9-mkl@pengutronix.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366919-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev 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 Organization: Usenet Network Message-ID: <179508207110.3136.11792101604636296316@kernel.org> References: <20261118092955.1283165-9-mkl@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2842343"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:SyT8MmgeWTqHUe4RMsHP7Fl79TQ= sha256:vrHwtzSxW1wuz52SZyxHtXI4r/6PBwJwIlyBD5Q1r4k= sha1:lbc3O7J1RmjW096RiSSJdQbfSUs= sha256:shfW7KU2nIV6z8jKShKZ58sT314efYKiT45pU00FpJw= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 7467F1155A8; Thu, 19 Nov 2026 12:54:57 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QhITYb-r7xhZ; Thu, 19 Nov 2026 12:54:53 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-366919-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 0821E1155A3; Thu, 19 Nov 2026 12:54:40 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id D0A4D1C2FD8; Thu, 19 Nov 2026 09:54:36 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795082073; b=JJH/NE7zaTYF22BhbKr0XAAvTS7wg1eJNU4CmMVl5YLAcRSOfGco8a25kdFO0yGyLvha 44FI9613mRzk2nnpit0I4HnfhYTgf/NAfYsHL8sRT1hVvLYn/4OBYNG4gjZHrDz8xb/Wj 0GiTuf61bw0XzzcQV5l22pJVZhd2lmD6zwW5qU+z6umcIoZHX+k0+eif3ONetZg3DQH5P gHAm5A3L0eJg/z1WQMT/bOabKvYHmydqnVcGFmKfXm7j041xUDeJPkSLbTQXxKyksa3Fn aaznz5xXq7h+f1O/2QvDBYHha9VMdHCcDDXWb2MuUHrZQ/b/0F8KU6J2X7LRR2n547Q== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795082073; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=gZVA8ywCoKmS+/d31S2Dgx9UVZbLmCmiU0Ycu6ZMxds=; b=tPbGUu5/w22SPTDrTzRFeBGYvDngHfFGvZEPJ6hgajCGUFQ6bxse2Br6OVuKe5msa6jF eY2L0NNjWJ35rNtLkddnj49pixKerdflEVypCcvuLcYr83X85DXcRVaK+BuMjCWpxA8le MT44gDF3lImr/Da6ZJjJNZTGYWuXQ48tSaf0+r7IWyYZ6rnvExWht3wBZ7KKNCkwX3Iyc S4nbrDKmUKb/7GkycFoU9BDqvT9VjBI1f2cW5ZuCWKPz4an+vtenvQaPyfzH6I6n7mThh C6d9wsBKkAyPqXS3yvbxSpTILPzwF+bGlUIHnV7H/crS066awJVjv/fgXBSzlp3U6lw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=aIDDhWH5; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F91F60A2607; Thu, 19 Nov 2026 09:54:33 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=aIDDhWH5 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795082072; b=kdZFsycR+Xq5B4910Mruj/IJBd+3SXbZb6RDn5tnCDzbCrlJDz0e2utuU24LhzErFNpw gkedILuhdEywjksE0GlY+A2/dTaYNALziZ/amiC6l104D/U4utbb9bKBA3pxPw0ekMRn7 xAaMUmNwBXpJ9l+Cf8yTp2IFBSpif3LaD9/5kvEO5iTTtB/TXdakWGrAVbZG6fI7aD/KD Z5iiSk8he8v9Rd+klp/Bt3zWP3hMygOz1pwIU7LDfmn3uzfzv9Gj2H94Sd5PC7r75WN3F 7X1jrcJlRjfstjg13UfOwsjIBQ+YHVcqRNtrwrOGqAHMrtAcCEKZd3AscSAazQLUTag== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795082072; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=gZVA8ywCoKmS+/d31S2Dgx9UVZbLmCmiU0Ycu6ZMxds=; b=0HtjIreBCK6KhSreCuwY9RXAfWYtmst8olc/Y21xZifBzabgEkbPbuou7lKmyMndeOEY psMgedkcjJ5r7O/kZ5Z5rU1AZhmqBzS2vfJnn0RkAalQFtGvffUW/ngqq9yebpZdj80xV s48ypvFNoMVIm3PJVQFz2olwaFcDKsNM0yU/RSASMX9VRlGbo5Fk4gvWGuZdS8kiW0FPt d5PZk6uxi0niXLd7ZUvyA0bLiIAjYVZdBwT2BPoH7wa7Kvuisx/APUcYoxJJjcC9IP1m9 bwnsiJIz9aGDaI/ZELUoXlf3zT1g/yXb41+ny2MIW2vTYLvvlyZpzNCiQ2ZJ7RZvC4A== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=aIDDhWH5; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9EF09606A334; Thu, 19 Nov 2026 09:54:32 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F8151F000C5; Thu, 19 Nov 2026 09:54:31 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795082071; bh=gZVA8ywCoKmS+/d31S2Dgx9UVZbLmCmiU0Ycu6ZMxds=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=aIDDhWH56oARjS47tPdNxec0Z9ClYE9pCHHxf6kFDec2fiLOwaIzL5Ur/DUzBdPeP R/6vIoKzusW4P3aq/gIlhNYn937wPVgcxUrk989It9Ms6EedIFXwOoXL1e6QlFAo6g EBjfLzClBA9qXk+xsvaHJQQdHfYVobjBhgKCzg48JF112tadbiGhNXegNic0/OenTS OByj1kuPrPwSx+EOYE4IfXk2CJXQ8qMiZRXQk1sjQ5o4oYsBewWw0dRiR557wO8NOq Dk7xSiFtF8ABsH6NRQplasiqASLM0MiEp91iiAAdv3QbMRa4YCeAL/tfPTvljDkYfu 3odk6kOObbzCw== X-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 X-In-Reply-To: <20261118092955.1283165-9-mkl@pengutronix.de> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list