mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 17:59:32 +00:00
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: 84fe2cab48
("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>
This commit is contained in:
parent
63f55fcea5
commit
3c74cbb8d0
1 changed files with 0 additions and 1 deletions
|
@ -541,7 +541,6 @@ static int cpufreq_power2state(struct thermal_cooling_device *cdev,
|
||||||
struct cpufreq_cooling_device *cpufreq_cdev = cdev->devdata;
|
struct cpufreq_cooling_device *cpufreq_cdev = cdev->devdata;
|
||||||
struct cpufreq_policy *policy = cpufreq_cdev->policy;
|
struct cpufreq_policy *policy = cpufreq_cdev->policy;
|
||||||
|
|
||||||
power = power > 0 ? power : 0;
|
|
||||||
last_load = cpufreq_cdev->last_load ?: 1;
|
last_load = cpufreq_cdev->last_load ?: 1;
|
||||||
normalised_power = (power * 100) / last_load;
|
normalised_power = (power * 100) / last_load;
|
||||||
target_freq = cpu_power_to_freq(cpufreq_cdev, normalised_power);
|
target_freq = cpu_power_to_freq(cpufreq_cdev, normalised_power);
|
||||||
|
|
Loading…
Reference in a new issue