public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "quanyang.wang" <quanyang.wang@windriver.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpufreq: dt: check the error returned by dev_pm_opp_of_cpumask_add_table
Date: Thu, 25 Mar 2021 13:36:52 +0800	[thread overview]
Message-ID: <e20f0c26-a357-7ddb-1c50-e84eff84b853@windriver.com> (raw)
In-Reply-To: <20210325052417.xyctxztqbozut3ck@vireshk-i7>

Hi Viresh,

On 3/25/21 1:24 PM, Viresh Kumar wrote:
> On 25-03-21, 13:15, quanyang.wang wrote:
>> Thank you for pointing it out.  Do you mean that even if
>> dev_pm_opp_of_cpumask_add_table returns
>>
>> an error, dev_pm_opp_get_opp_count may still return count > 0 because
>> someone may call dev_pm_opp_add
>>
>> to add OPP to cpu succcessfully at somewhere else?
> Yes.
>
> There are two ways we can add OPPs today:
>
> - Statically via device tree. This is what
>    dev_pm_opp_of_cpumask_add_table() tries to do.
>
> - Dynamically via call to dev_pm_opp_add(), which I described earlier.
>
> What failed here is the static way of adding OPPs, we still need to
> check if OPPs were added dynamically.

Thank you for shedding light on this.

I will send a V2 patch which only check the return error -EPROBE_DEFER.

Thanks,

Quanyang

>

      reply	other threads:[~2021-03-25  5:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25  4:31 [PATCH] cpufreq: dt: check the error returned by dev_pm_opp_of_cpumask_add_table quanyang.wang
2021-03-25  4:45 ` Viresh Kumar
2021-03-25  5:15   ` quanyang.wang
2021-03-25  5:24     ` Viresh Kumar
2021-03-25  5:36       ` quanyang.wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e20f0c26-a357-7ddb-1c50-e84eff84b853@windriver.com \
    --to=quanyang.wang@windriver.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox