Re: [PATCH] irqchip/renesas-irqc: Use platform_get_irq_optional() to get the interrupt

From: Andy Shevchenko
Date: Sun Dec 26 2021 - 03:49:25 EST


On Sun, Dec 26, 2021 at 1:59 AM Lad, Prabhakar
<prabhakar.csengg@xxxxxxxxx> wrote:
> On Sat, Dec 25, 2021 at 5:40 PM Andy Shevchenko
> <andy.shevchenko@xxxxxxxxx> wrote:
> > On Sat, Dec 25, 2021 at 7:28 PM Lad, Prabhakar
> > <prabhakar.csengg@xxxxxxxxx> wrote:
> > > On Sat, Dec 25, 2021 at 4:46 PM Andy Shevchenko
> > > <andy.shevchenko@xxxxxxxxx> wrote:
> > > > On Thu, Dec 16, 2021 at 9:52 AM Lad Prabhakar
> > > > <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx> wrote:
> >
> > > > ret = platform_get_irq_optional(...);
> > > > if (ret < 0 && ret != -ENXIO)
> > > > return ret;
> > > > if (ret > 0)
> > > > ...we got it...
> > > >
> > > > It will allow the future API fix of platform_get_irq_optional() to be
> > > > really optional.
> > > >
> > > Later patch [0] (merged into -next) does check for -ENXIO first.
> > >
> > > [0] https://lore.kernel.org/lkml/20211216182121.5323-1-prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx/t/
> >
> > The problem is that it doesn't consider 0 as no IRQ.
> >
> Can you please point me to the discussion/patch where this API change
> is considered/discussed. Just to clarify now the new API for
> platform_get_irq_optional() will return "0" in case there is no
> interrupt and not not -ENXIO anymore?

The longest one happened here:
https://lore.kernel.org/linux-ide/20211209145937.77719-1-andriy.shevchenko@xxxxxxxxxxxxxxx/T/#u

It has links to some other discussions on the topic.

> When will this patch be merged for the new api, so that I can base my
> patches on top of it to avoid more changes?

You can simply imply that, I dunno when it gets merged (from my point
of view the users should be fixed first, and since you are adding
users, the burden is increasing).

--
With Best Regards,
Andy Shevchenko