summaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorDaniel Lezcano2019-04-24 22:56:09 +0200
committerEduardo Valentin2019-05-14 16:00:33 +0200
commit3c74cbb8d0013f6ec7cdee0812247dae35edd757 (patch)
treefdd66466b9c1d6c9577fee13beae6d41fe78b6c9 /drivers/thermal
parentthermal: rcar_gen3_thermal: disable interrupt in .remove (diff)
downloadkernel-qcow2-linux-3c74cbb8d0013f6ec7cdee0812247dae35edd757.tar.gz
kernel-qcow2-linux-3c74cbb8d0013f6ec7cdee0812247dae35edd757.tar.xz
kernel-qcow2-linux-3c74cbb8d0013f6ec7cdee0812247dae35edd757.zip
thermal/drivers/cpu_cooling: Remove pointless test in power2state()
When the static power computation was removed, the test with the power being negative was not removed. However, the substraction which was responsible of the negative value was removed and the variable is now an u32. A double reason to remove the test which does not make sense. Fixes: 84fe2cab48590 ("cpu_cooling: Drop static-power related stuff") Cc: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/cpu_cooling.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index f7c1f49ec87f..ee8419a6390c 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -541,7 +541,6 @@ static int cpufreq_power2state(struct thermal_cooling_device *cdev,
struct cpufreq_cooling_device *cpufreq_cdev = cdev->devdata;
struct cpufreq_policy *policy = cpufreq_cdev->policy;
- power = power > 0 ? power : 0;
last_load = cpufreq_cdev->last_load ?: 1;
normalised_power = (power * 100) / last_load;
target_freq = cpu_power_to_freq(cpufreq_cdev, normalised_power);