From: Sudeep Holla <sudeep.holla@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
linux-kernel@vger.kernel.org, Viresh Kumar <vireshk@kernel.org>,
Nishanth Menon <nm@ti.com>, Stephen Boyd <sboyd@codeaurora.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-pm@vger.kernel.org
Subject: Re: [PATCH v2 1/2] PM / OPP: add non-OF versions of dev_pm_opp_{cpumask_,}remove_table
Date: Fri, 29 Apr 2016 10:22:09 +0100 [thread overview]
Message-ID: <572327C1.4000604@arm.com> (raw)
In-Reply-To: <20160429040721.GV2915@vireshk-i7>
On 29/04/16 05:07, Viresh Kumar wrote:
> On 28-04-16, 18:07, Sudeep Holla wrote:
>> diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
>> index 433b60092972..e59b9e7c31ba 100644
>> --- a/drivers/base/power/opp/core.c
>> +++ b/drivers/base/power/opp/core.c
[...]
>> {
>> struct opp_table *opp_table;
>> struct dev_pm_opp *opp, *tmp;
>> @@ -1884,7 +1885,7 @@ void dev_pm_opp_of_remove_table(struct device *dev)
>> if (list_is_singular(&opp_table->dev_list)) {
>> /* Free static OPPs */
>> list_for_each_entry_safe(opp, tmp, &opp_table->opp_list, node) {
>> - if (!opp->dynamic)
>> + if (!opp->dynamic || (opp->dynamic && remove_dyn))
>
> Well, that's a funny one :)
>
> The second conditional statement doesn't require opp->dynamic, as that is
> guaranteed to be true, as the first condition failed.
>
> So this should be:
>
> if (remove_all || !opp->dynamic)
>
Yes, initially I thought we may need to support a mix where both static
entries from DT and dynamic entries will be present and this function
must remove the latter only. But I soon realized that it's not required
and also will get ugly. However I forgot to change this part :(
>> _opp_remove(opp_table, opp, true);
>> }
>> } else {
>> @@ -1894,6 +1895,44 @@ void dev_pm_opp_of_remove_table(struct device *dev)
>> unlock:
>> mutex_unlock(&opp_table_lock);
>> }
>> +
>> +/**
>> + * dev_pm_opp_of_remove_table() - Free OPP table entries created from static DT
>
> No, this isn't the OF specific function.
>
Sorry, copy-paste disease :) esp. for documenting.
--
Regards,
Sudeep
next prev parent reply other threads:[~2016-04-29 9:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-28 10:25 [PATCH 1/2] PM / OPP: Remove OF dependency on dev_pm_opp_of_{cpumask_,}remove_table Sudeep Holla
2016-04-28 10:25 ` [PATCH 2/2] cpufreq: arm_big_little: use generic OPP functions for {init,free}_opp_table Sudeep Holla
2016-04-28 11:26 ` Viresh Kumar
2016-04-28 12:48 ` Sudeep Holla
2016-04-28 11:12 ` [PATCH 1/2] PM / OPP: Remove OF dependency on dev_pm_opp_of_{cpumask_,}remove_table Viresh Kumar
2016-04-28 11:15 ` Viresh Kumar
2016-04-28 11:22 ` Sudeep Holla
2016-04-28 17:07 ` [PATCH v2 1/2] PM / OPP: add non-OF versions of dev_pm_opp_{cpumask_,}remove_table Sudeep Holla
2016-04-28 17:07 ` [PATCH v2 2/2] cpufreq: arm_big_little: use generic OPP functions for {init,free}_opp_table Sudeep Holla
2016-04-29 4:12 ` Viresh Kumar
2016-04-29 4:07 ` [PATCH v2 1/2] PM / OPP: add non-OF versions of dev_pm_opp_{cpumask_,}remove_table Viresh Kumar
2016-04-29 9:22 ` Sudeep Holla [this message]
2016-04-29 9:22 ` [PATCH v2 1/2][UPDATE] " Sudeep Holla
2016-04-29 9:28 ` Viresh Kumar
2016-04-29 9:31 ` Sudeep Holla
2016-04-29 9:32 ` Viresh Kumar
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=572327C1.4000604@arm.com \
--to=sudeep.holla@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nm@ti.com \
--cc=rjw@rjwysocki.net \
--cc=sboyd@codeaurora.org \
--cc=viresh.kumar@linaro.org \
--cc=vireshk@kernel.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