diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-02-06 07:50:24 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-03-09 08:40:55 -0500 |
commit | d10b5eb5fce436ba22443ab83eeb36e195dbf772 (patch) | |
tree | 69d4b67ea294fa056c5e583b82bedae1c42edb24 /drivers/cpufreq/cpufreq_governor.c | |
parent | e40e7b255e591d0448500c7910ec5693f58026bd (diff) |
cpufreq: governor: Drop cpu argument from dbs_check_cpu()
Since policy->cpu is always passed as the second argument to
dbs_check_cpu(), it is not really necessary to pass it, because
the function can obtain that value via its first argument just fine.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/cpufreq_governor.c')
-rw-r--r-- | drivers/cpufreq/cpufreq_governor.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index b425cd3da682..431d81f7963c 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c | |||
@@ -31,8 +31,9 @@ static struct attribute_group *get_sysfs_attr(struct dbs_governor *gov) | |||
31 | gov->attr_group_gov_pol : gov->attr_group_gov_sys; | 31 | gov->attr_group_gov_pol : gov->attr_group_gov_sys; |
32 | } | 32 | } |
33 | 33 | ||
34 | void dbs_check_cpu(struct cpufreq_policy *policy, int cpu) | 34 | void dbs_check_cpu(struct cpufreq_policy *policy) |
35 | { | 35 | { |
36 | int cpu = policy->cpu; | ||
36 | struct dbs_governor *gov = dbs_governor_of(policy); | 37 | struct dbs_governor *gov = dbs_governor_of(policy); |
37 | struct cpu_dbs_info *cdbs = gov->get_cpu_cdbs(cpu); | 38 | struct cpu_dbs_info *cdbs = gov->get_cpu_cdbs(cpu); |
38 | struct dbs_data *dbs_data = policy->governor_data; | 39 | struct dbs_data *dbs_data = policy->governor_data; |
@@ -517,8 +518,7 @@ static int cpufreq_governor_stop(struct cpufreq_policy *policy) | |||
517 | static int cpufreq_governor_limits(struct cpufreq_policy *policy) | 518 | static int cpufreq_governor_limits(struct cpufreq_policy *policy) |
518 | { | 519 | { |
519 | struct dbs_governor *gov = dbs_governor_of(policy); | 520 | struct dbs_governor *gov = dbs_governor_of(policy); |
520 | unsigned int cpu = policy->cpu; | 521 | struct cpu_dbs_info *cdbs = gov->get_cpu_cdbs(policy->cpu); |
521 | struct cpu_dbs_info *cdbs = gov->get_cpu_cdbs(cpu); | ||
522 | 522 | ||
523 | /* State should be equivalent to START */ | 523 | /* State should be equivalent to START */ |
524 | if (!cdbs->policy_dbs || !cdbs->policy_dbs->policy) | 524 | if (!cdbs->policy_dbs || !cdbs->policy_dbs->policy) |
@@ -531,7 +531,7 @@ static int cpufreq_governor_limits(struct cpufreq_policy *policy) | |||
531 | else if (policy->min > cdbs->policy_dbs->policy->cur) | 531 | else if (policy->min > cdbs->policy_dbs->policy->cur) |
532 | __cpufreq_driver_target(cdbs->policy_dbs->policy, policy->min, | 532 | __cpufreq_driver_target(cdbs->policy_dbs->policy, policy->min, |
533 | CPUFREQ_RELATION_L); | 533 | CPUFREQ_RELATION_L); |
534 | dbs_check_cpu(policy, cpu); | 534 | dbs_check_cpu(policy); |
535 | mutex_unlock(&cdbs->policy_dbs->timer_mutex); | 535 | mutex_unlock(&cdbs->policy_dbs->timer_mutex); |
536 | 536 | ||
537 | return 0; | 537 | return 0; |