lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohpokhMk47kP1yCcNSuFG6K6s70YBU-SKJ3x0imyDAvWSaKQ@mail.gmail.com>
Date:	Sun, 17 Nov 2013 21:53:15 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:	Lan Tianyu <tianyu.lan@...el.com>,
	"cpufreq@...r.kernel.org" <cpufreq@...r.kernel.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2] Cpufreq: Make governor data on nonboot cpus across
 system suspend/resume

On 17 November 2013 20:14, Rafael J. Wysocki <rjw@...ysocki.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..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ