[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAHp75VcubOLjXGCyh95zcDGNryAorO_WcgqeK0Vq81DsXSHW7Q@mail.gmail.com>
Date: Sat, 25 Dec 2021 17:55:06 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Cc: Geert Uytterhoeven <geert+renesas@...der.be>,
Niklas Söderlund <niklas.soderlund@...natech.se>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Amit Kucheria <amitk@...nel.org>,
Zhang Rui <rui.zhang@...el.com>,
Rob Herring <robh+dt@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Prabhakar <prabhakar.csengg@...il.com>,
"linux-renesas-soc@...r.kernel.org"
<linux-renesas-soc@...r.kernel.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>
Subject: Re: [PATCH v2] thermal: rcar_thermal: Use platform_get_irq_optional()
to get the interrupt
On Sat, Dec 25, 2021 at 1:41 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
> On Friday, December 24, 2021, Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com> wrote:
...
>> + int irq;
>> +
>> + irq = platform_get_irq_optional(pdev, i);
>> + if (irq == -ENXIO)
>> + break;
>> + if (irq < 0) {
>> + ret = irq;
>> + goto error_unregister;
>> + }
>
>
> In all your patches which introduce optional IRQ please change the logic to the opposite:
>
> if (irq > 0)
> ...we got one...
> if (irq == -EPROBE_DEFER)
> ...return it, if it is ever possible...
>
> With this you adding me a work.
I noticed that in some patches you actually do the right things, so,
please do it in the same way where you use _optiomal() variant, i.e.
if (ret < 0 && ret != -ENXIO)
return ret;
if (ret > 0)
...we got it...
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists