Skip to content

Commit

Permalink
cpufreq: Fix checkpatch errors and warnings
Browse files Browse the repository at this point in the history
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>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Stratos Karafotis authored and Rafael J. Wysocki committed Mar 20, 2014
1 parent bfa709b commit e5c87b7
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,8 +939,11 @@ 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;
}
Expand Down Expand Up @@ -1394,14 +1397,14 @@ 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;
}
}

Expand Down Expand Up @@ -2086,7 +2089,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);
}

Expand Down

0 comments on commit e5c87b7

Please sign in to comment.