提交 18f301c9 编写于 作者: V Viresh Kumar 提交者: Eduardo Valentin

thermal: cpu_cooling: get rid of a variable in cpufreq_set_cur_state()

'cpu' is used at only one place and there is no need to keep a separate
variable for it.
Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: NLukasz Luba <lukasz.luba@arm.com>
Tested-by: NLukasz Luba <lukasz.luba@arm.com>
Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
上级 3e08b2df
...@@ -456,7 +456,6 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev, ...@@ -456,7 +456,6 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev,
unsigned long state) unsigned long state)
{ {
struct cpufreq_cooling_device *cpufreq_cdev = cdev->devdata; struct cpufreq_cooling_device *cpufreq_cdev = cdev->devdata;
unsigned int cpu = cpumask_any(&cpufreq_cdev->allowed_cpus);
unsigned int clip_freq; unsigned int clip_freq;
/* Request state should be less than max_level */ /* Request state should be less than max_level */
...@@ -471,7 +470,7 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev, ...@@ -471,7 +470,7 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev,
cpufreq_cdev->cpufreq_state = state; cpufreq_cdev->cpufreq_state = state;
cpufreq_cdev->clipped_freq = clip_freq; cpufreq_cdev->clipped_freq = clip_freq;
cpufreq_update_policy(cpu); cpufreq_update_policy(cpumask_any(&cpufreq_cdev->allowed_cpus));
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册