[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250218132756.GU1615191@kernel.org>
Date: Tue, 18 Feb 2025 13:27:56 +0000
From: Simon Horman <horms@...nel.org>
To: Lorenzo Bianconi <lorenzo@...nel.org>
Cc: Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Felix Fietkau <nbd@....name>, Sean Wang <sean.wang@...iatek.com>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
"Chester A. Unal" <chester.a.unal@...nc9.com>,
Daniel Golle <daniel@...rotopia.org>,
DENG Qingfang <dqfext@...il.com>, Andrew Lunn <andrew@...n.ch>,
Vladimir Oltean <olteanv@...il.com>, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, devicetree@...r.kernel.org,
upstream@...oha.com
Subject: Re: [PATCH net-next v4 13/16] net: airoha: Introduce Airoha NPU
support
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().
Powered by blists - more mailing lists