* [PATCH] cpufreq: Fix checkpatch errors and warnings
@ 2014-03-19 21:29 Stratos Karafotis
2014-03-20 0:05 ` Viresh Kumar
0 siblings, 1 reply; 2+ messages in thread
From: Stratos Karafotis @ 2014-03-19 21:29 UTC (permalink / raw)
To: Rafael J. Wysocki, Viresh Kumar
Cc: cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, LKML
Fix 2 checkpatch errors about using assignment in if condition,
1 checkpatch error about a required space after comma
and 3 warnings about line over 80 characters.
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
---
drivers/cpufreq/cpufreq.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index e3aa9de..1eafd8c 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -939,8 +939,10 @@ static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy,
up_write(&policy->rwsem);
if (has_target()) {
- if ((ret = __cpufreq_governor(policy, CPUFREQ_GOV_START)) ||
- (ret = __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS))) {
+ ret = __cpufreq_governor(policy, CPUFREQ_GOV_START);
+ if (!ret)
+ ret = __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS);
+ if (ret) {
pr_err("%s: Failed to start governor\n", __func__);
return ret;
}
@@ -1394,14 +1396,13 @@ static int __cpufreq_remove_dev_finish(struct device *dev,
if (!cpufreq_suspended)
cpufreq_policy_free(policy);
- } else {
- if (has_target()) {
- if ((ret = __cpufreq_governor(policy, CPUFREQ_GOV_START)) ||
- (ret = __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS))) {
- pr_err("%s: Failed to start governor\n",
- __func__);
- return ret;
- }
+ } else if (has_target()) {
+ ret = __cpufreq_governor(policy, CPUFREQ_GOV_START);
+ if (!ret)
+ ret = __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS);
+ if (ret) {
+ pr_err("%s: Failed to start governor\n", __func__);
+ return ret;
}
}
@@ -2086,7 +2087,7 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy,
if (old_gov) {
__cpufreq_governor(policy, CPUFREQ_GOV_STOP);
up_write(&policy->rwsem);
- __cpufreq_governor(policy,CPUFREQ_GOV_POLICY_EXIT);
+ __cpufreq_governor(policy, CPUFREQ_GOV_POLICY_EXIT);
down_write(&policy->rwsem);
}
--
1.8.5.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] cpufreq: Fix checkpatch errors and warnings
2014-03-19 21:29 [PATCH] cpufreq: Fix checkpatch errors and warnings Stratos Karafotis
@ 2014-03-20 0:05 ` Viresh Kumar
0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2014-03-20 0:05 UTC (permalink / raw)
To: Stratos Karafotis
Cc: Rafael J. Wysocki, cpufreq@vger.kernel.org,
linux-pm@vger.kernel.org, LKML
On 20 March 2014 02:59, Stratos Karafotis <stratosk@semaphore.gr> wrote:
> Fix 2 checkpatch errors about using assignment in if condition,
> 1 checkpatch error about a required space after comma
> and 3 warnings about line over 80 characters.
>
> Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
> ---
> drivers/cpufreq/cpufreq.c | 23 ++++++++++++-----------
> 1 file changed, 12 insertions(+), 11 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-20 0:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-19 21:29 [PATCH] cpufreq: Fix checkpatch errors and warnings Stratos Karafotis
2014-03-20 0:05 ` Viresh Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox