diff mbox series

thermal: cpu_cooling: Remove unused cur_freq variable

Message ID 1550470950-9460-1-git-send-email-zhangshaokun@hisilicon.com (mailing list archive)
State Not Applicable, archived
Delegated to: Zhang Rui
Headers show
Series thermal: cpu_cooling: Remove unused cur_freq variable | expand

Commit Message

Shaokun Zhang Feb. 18, 2019, 6:22 a.m. UTC
The 'cur_freq' local variable became unused after commit 84fe2cab4859
("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: Shaokun Zhang <zhangshaokun@hisilicon.com>
---
 drivers/thermal/cpu_cooling.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Viresh Kumar Feb. 18, 2019, 6:28 a.m. UTC | #1
On 18-02-19, 14:22, Shaokun Zhang wrote:
> The 'cur_freq' local variable became unused after commit 84fe2cab4859
> ("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: Shaokun Zhang <zhangshaokun@hisilicon.com>
> ---
>  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 6fff16113628..f7c1f49ec87f 100644
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -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;

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Zhang Rui Feb. 18, 2019, 7:42 a.m. UTC | #2
On 一, 2019-02-18 at 11:58 +0530, Viresh Kumar wrote:
> On 18-02-19, 14:22, Shaokun Zhang wrote:
> > 
> > The 'cur_freq' local variable became unused after commit
> > 84fe2cab4859
> > ("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: Shaokun Zhang <zhangshaokun@hisilicon.com>
> > ---
> >  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 6fff16113628..f7c1f49ec87f 100644
> > --- a/drivers/thermal/cpu_cooling.c
> > +++ b/drivers/thermal/cpu_cooling.c
> > @@ -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;
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> 
patch applied.

thanks,
rui
diff mbox series

Patch

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 6fff16113628..f7c1f49ec87f 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -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;