lkml.org 
[lkml]   [2013]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V2] Cpufreq: Make governor data on nonboot cpus across system suspend/resume
From
On 17 November 2013 20:14, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> On Sunday, November 17, 2013 09:43:14 AM viresh kumar wrote:

>> + else if (event == CPUFREQ_GOV_POLICY_INIT)
>> + if (ret == -EALREADY) {
>
> You can write this as
>
> else if (event == CPUFREQ_GOV_POLICY_INIT && ret == -EALREADY) {

I wrote it that way on the first go (though with separate braces for
both comparisons
as well), but there were multiple statements to enclose and so will
require {} and then
that would have to be added for above single line if/else as well, if
we follow coding
guidelines properly..

Anyway, this code is no more required. :)

>> + module_put(policy->governor->owner);
>> + ret = 0;
>> + }
>> mutex_unlock(&cpufreq_governor_lock);
>> }
>>
>> - if (((event == CPUFREQ_GOV_POLICY_INIT) && ret) ||
>> - ((event == CPUFREQ_GOV_POLICY_EXIT) && !ret))
>> - module_put(policy->governor->owner);
>> -
>> return ret;
>
> Apart from the above I agree.

Thanks..


\
 
 \ /
  Last update: 2013-11-17 17:41    [W:0.252 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site