[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VdkxbJP7T-qaS=NKAUb7dXJdKeGRneQw+A1XN5AGtajeA@mail.gmail.com>
Date: Sat, 25 Dec 2021 18:37:12 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Stephen Boyd <swboyd@...omium.org>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-arm-msm@...r.kernel.org, Linux PM <linux-pm@...r.kernel.org>,
Thara Gopinath <thara.gopinath@...aro.org>
Subject: Re: [PATCH] cpufreq: qcom-hw: Use optional irq API
On Mon, Dec 6, 2021 at 5:26 PM Viresh Kumar <viresh.kumar@...aro.org> wrote:
>
> On 16-11-21, 18:03, Stephen Boyd wrote:
> > Use platform_get_irq_optional() to avoid a noisy error message when the
> > irq isn't specified. The irq is definitely optional given that we only
> > care about errors that are -EPROBE_DEFER here.
> > + data->throttle_irq = platform_get_irq_optional(pdev, index);
> > + if (data->throttle_irq == -ENXIO)
> > + return 0;
> > + if (data->throttle_irq < 0)
> > + return data->throttle_irq;
This adds more work for the future.
The best approach is
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.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists