Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0fda737 authored by Shaokun Zhang's avatar Shaokun Zhang Committed by Zhang Rui
Browse files

thermal: cpu_cooling: Remove unused cur_freq variable



The 'cur_freq' local variable became unused after commit 84fe2cab
("cpu_cooling: Drop static-power related stuff"), let's remove it.

Cc: Amit Daniel Kachhap <amit.kachhap@gmail.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Javi Merino <javi.merino@kernel.org>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarShaokun Zhang <zhangshaokun@hisilicon.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent 35122495
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -536,12 +536,11 @@ static int cpufreq_power2state(struct thermal_cooling_device *cdev,
			       struct thermal_zone_device *tz, u32 power,
			       unsigned long *state)
{
	unsigned int cur_freq, target_freq;
	unsigned int target_freq;
	u32 last_load, normalised_power;
	struct cpufreq_cooling_device *cpufreq_cdev = cdev->devdata;
	struct cpufreq_policy *policy = cpufreq_cdev->policy;

	cur_freq = cpufreq_quick_get(policy->cpu);
	power = power > 0 ? power : 0;
	last_load = cpufreq_cdev->last_load ?: 1;
	normalised_power = (power * 100) / last_load;