Re: [PATCH net-next v4 13/16] net: airoha: Introduce Airoha NPU support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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().
> 

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux