From: Simon Horman <horms@kernel.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Felix Fietkau <nbd@nbd.name>, Sean Wang <sean.wang@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
"Chester A. Unal" <chester.a.unal@arinc9.com>,
Daniel Golle <daniel@makrotopia.org>,
DENG Qingfang <dqfext@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
Vladimir Oltean <olteanv@gmail.com>,
netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org,
upstream@airoha.com
Subject: Re: [PATCH net-next v4 13/16] net: airoha: Introduce Airoha NPU support
Date: Tue, 18 Feb 2025 13:27:56 +0000 [thread overview]
Message-ID: <20250218132756.GU1615191@kernel.org> (raw)
In-Reply-To: <Z7OMv-7UBVtKaEFb@lore-desk>
On Mon, Feb 17, 2025 at 08:23:43PM +0100, Lorenzo Bianconi wrote:
...
> > > + err = devm_request_irq(dev, irq, airoha_npu_mbox_handler,
> > > + IRQF_SHARED, "airoha-npu-mbox", npu);
> > > + if (err)
> > > + return err;
> > > +
> > > + for (i = 0; i < ARRAY_SIZE(npu->cores); i++) {
> > > + struct airoha_npu_core *core = &npu->cores[i];
> > > +
> > > + spin_lock_init(&core->lock);
> > > + core->npu = npu;
> > > +
> > > + irq = platform_get_irq(pdev, i + 1);
> > > + if (irq < 0)
> > > + return err;
...
> > Should this return irq rather than err?
>
> are you referring to devm_request_irq()?
>
> https://elixir.bootlin.com/linux/v6.13.2/source/include/linux/interrupt.h#L215
> https://elixir.bootlin.com/linux/v6.13.2/source/kernel/irq/devres.c#L52
>
> I guess it returns 0 on success and a negative value in case of error.
Hi Lorenzo,
Sorry, somehow I completely messed-up trimming context and managed to make
things utterly confusing.
I've trimmed things again, and it is the platform_get_irq() call
not far above this line that I'm referring to. It assigns the
return value of a function to irq, tests irq, but returns err.
It is one of (at least) two calls to platform_get_irq() in airoha_npu_probe().
next prev parent reply other threads:[~2025-02-18 13:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 15:34 [PATCH net-next v4 00/16] Introduce flowtable hw offloading in airoha_eth driver Lorenzo Bianconi
2025-02-13 15:34 ` [PATCH net-next v4 01/16] net: airoha: Fix TSO support for header cloned skbs Lorenzo Bianconi
2025-02-14 21:35 ` Jakub Kicinski
2025-02-13 15:34 ` [PATCH net-next v4 02/16] net: airoha: Move airoha_eth driver in a dedicated folder Lorenzo Bianconi
2025-02-13 15:34 ` [PATCH net-next v4 03/16] net: airoha: Move definitions in airoha_eth.h Lorenzo Bianconi
2025-02-13 15:34 ` [PATCH net-next v4 04/16] net: airoha: Move reg/write utility routines " Lorenzo Bianconi
2025-02-13 15:34 ` [PATCH net-next v4 05/16] net: airoha: Move register definitions in airoha_regs.h Lorenzo Bianconi
2025-02-13 15:34 ` [PATCH net-next v4 06/16] net: airoha: Move DSA tag in DMA descriptor Lorenzo Bianconi
2025-02-13 15:34 ` [PATCH net-next v4 07/16] net: dsa: mt7530: Enable Rx sptag for EN7581 SoC Lorenzo Bianconi
2025-02-13 15:34 ` [PATCH net-next v4 08/16] net: airoha: Enable support for multiple net_devices Lorenzo Bianconi
2025-02-13 15:34 ` [PATCH net-next v4 09/16] net: airoha: Move REG_GDM_FWD_CFG() initialization in airoha_dev_init() Lorenzo Bianconi
2025-02-13 15:34 ` [PATCH net-next v4 10/16] net: airoha: Rename airoha_set_gdm_port_fwd_cfg() in airoha_set_vip_for_gdm_port() Lorenzo Bianconi
2025-02-13 15:34 ` [PATCH net-next v4 11/16] dt-bindings: net: airoha: Add the NPU node for EN7581 SoC Lorenzo Bianconi
2025-02-14 8:03 ` Krzysztof Kozlowski
2025-02-13 15:34 ` [PATCH net-next v4 12/16] dt-bindings: net: airoha: Add airoha,npu phandle property Lorenzo Bianconi
2025-02-13 15:34 ` [PATCH net-next v4 13/16] net: airoha: Introduce Airoha NPU support Lorenzo Bianconi
2025-02-17 18:38 ` Simon Horman
2025-02-17 19:23 ` Lorenzo Bianconi
2025-02-18 13:27 ` Simon Horman [this message]
2025-02-18 13:45 ` Lorenzo Bianconi
2025-02-13 15:34 ` [PATCH net-next v4 14/16] net: airoha: Introduce flowtable offload support Lorenzo Bianconi
2025-02-14 14:06 ` kernel test robot
2025-02-13 15:34 ` [PATCH net-next v4 15/16] net: airoha: Add loopback support for GDM2 Lorenzo Bianconi
2025-02-13 15:34 ` [PATCH net-next v4 16/16] net: airoha: Introduce PPE debugfs support Lorenzo Bianconi
2025-02-17 18:44 ` Simon Horman
2025-02-17 21:43 ` Lorenzo Bianconi
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=20250218132756.GU1615191@kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chester.a.unal@arinc9.com \
--cc=conor+dt@kernel.org \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dqfext@gmail.com \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=sean.wang@mediatek.com \
--cc=upstream@airoha.com \
/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.