Re: [PATCH V2] Cpufreq: Make governor data on nonboot cpus across system suspend/resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17 November 2013 20:14, Rafael J. Wysocki <rjw@xxxxxxxxxxxxx> 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..
--
To unsubscribe from this list: send the line "unsubscribe cpufreq" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux