Re: [PATCH V2] Cpufreq: Make governor data on nonboot cpus acrosssystem suspend/resume
From: Viresh Kumar
Date: Sun Nov 17 2013 - 11:23:51 EST
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 linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/