Thread (24 messages) 24 messages, 2 authors, 2017-04-12
STALE3382d

[PATCH 06/17] thermal: cpu_cooling: get rid of a variable in cpufreq_set_cur_state()

From: Viresh Kumar <viresh.kumar@linaro.org>
Date: 2017-03-16 05:30:19
Also in: lkml
Subsystem: the rest, thermal · Maintainers: Linus Torvalds, Rafael J. Wysocki, Daniel Lezcano

'cpu' is used at only one place and there is no need to keep a separate
variable for it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/thermal/cpu_cooling.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 99dc6833de75..46e90122b746 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -457,7 +457,6 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev,
 				 unsigned long state)
 {
 	struct cpufreq_cooling_device *cpufreq_dev = cdev->devdata;
-	unsigned int cpu = cpumask_any(&cpufreq_dev->allowed_cpus);
 	unsigned int clip_freq;
 
 	/* Request state should be less than max_level */
@@ -472,7 +471,7 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev,
 	cpufreq_dev->cpufreq_state = state;
 	cpufreq_dev->clipped_freq = clip_freq;
 
-	cpufreq_update_policy(cpu);
+	cpufreq_update_policy(cpumask_any(&cpufreq_dev->allowed_cpus));
 
 	return 0;
 }
-- 
2.7.1.410.g6faf27b
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help