[PATCH net-next v4 13/16] net: airoha: Introduce Airoha NPU support
Lorenzo Bianconi
lorenzo at kernel.org
Tue Feb 18 05:45:41 PST 2025
On Feb 18, Simon Horman wrote:
> 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,
Hi Simon,
>
> 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.
ack, right. I will fix it in v6.
Regards,
Lorenzo
>
> It is one of (at least) two calls to platform_get_irq() in airoha_npu_probe().
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250218/1f384c7d/attachment.sig>
More information about the linux-arm-kernel
mailing list