Re: [PATCH RFC 02/11] ACPI: Introduce irq_get() for static fwnodes

From: Andy Shevchenko

Date: Wed Sep 30 2026 - 03:47:00 EST


On Tue, Sep 29, 2026 at 05:38:04PM -0700, Ashok Raj wrote:
> On Tue, Sep 29, 2026 at 10:40:59AM +0200, Lorenzo Pieralisi wrote:
> > On Mon, Sep 28, 2026 at 04:24:18PM -0700, Ashok Raj wrote:
> > > On Fri, Sep 25, 2026 at 09:48:01AM +0200, Lorenzo Pieralisi wrote:

...

> > > > + ret = acpi_static_fwnode_read_u32_prop_index(fwnode, ACPI_IRQ_PROP_GSI_POLARITY,
> > > > + index, &polarity);
>
> For each of the above calls for read_u32_prop_index() the allocation,
> copy a value and does free it.
>
> Instead you could read the whole array, and just get each value and
> discard it once?

This was my question as well. But I formulated it differently.

> > > > + if (ret)
> > > > + return ret == -ENOENT ? -ENXIO : ret;

--
With Best Regards,
Andy Shevchenko