Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1390928
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/2] PM / OPP: add non-OF versions of dev_pm_opp_{cpumask_,}remove_table |
| Date | 2016-04-29 11:30 +0200 |
| Message-ID | <rtcUi-3th-23@gated-at.bofh.it> (permalink) |
| References | <rsRmO-1va-25@gated-at.bofh.it> <rsXBV-7sB-11@gated-at.bofh.it> <rt7UB-82c-1@gated-at.bofh.it> |
| Organization | ARM |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 1/2] PM / OPP: add non-OF versions of dev_pm_opp_{cpumask_,}remove_table Sudeep Holla <sudeep.holla@arm.com> - 2016-04-28 19:10 +0200
Re: [PATCH v2 1/2] PM / OPP: add non-OF versions of dev_pm_opp_{cpumask_,}remove_table Viresh Kumar <viresh.kumar@linaro.org> - 2016-04-29 06:10 +0200
Re: [PATCH v2 1/2] PM / OPP: add non-OF versions of dev_pm_opp_{cpumask_,}remove_table Sudeep Holla <sudeep.holla@arm.com> - 2016-04-29 11:30 +0200
Re: [PATCH v2 1/2][UPDATE] PM / OPP: add non-OF versions of dev_pm_opp_{cpumask_,}remove_table Viresh Kumar <viresh.kumar@linaro.org> - 2016-04-29 11:30 +0200
Re: [PATCH v2 1/2][UPDATE] PM / OPP: add non-OF versions of dev_pm_opp_{cpumask_,}remove_table Sudeep Holla <sudeep.holla@arm.com> - 2016-04-29 11:40 +0200
Re: [PATCH v2 1/2][UPDATE] PM / OPP: add non-OF versions of dev_pm_opp_{cpumask_,}remove_table Viresh Kumar <viresh.kumar@linaro.org> - 2016-04-29 11:40 +0200
[PATCH v2 1/2][UPDATE] PM / OPP: add non-OF versions of dev_pm_opp_{cpumask_,}remove_table Sudeep Holla <sudeep.holla@arm.com> - 2016-04-29 11:30 +0200
csiph-web