[-next] cpufreq: qcom-hw: remove set but not used variable 'prev_cc'
diff mbox series

Message ID 20190821121445.72588-1-yuehaibing@huawei.com
State New
Delegated to: viresh kumar
Headers show
Series
  • [-next] cpufreq: qcom-hw: remove set but not used variable 'prev_cc'
Related show

Commit Message

Yuehaibing Aug. 21, 2019, 12:14 p.m. UTC
drivers/cpufreq/qcom-cpufreq-hw.c: In function qcom_cpufreq_hw_read_lut:
drivers/cpufreq/qcom-cpufreq-hw.c:89:38: warning:
 variable prev_cc set but not used [-Wunused-but-set-variable]

It is not used since commit 3003e75a5045 ("cpufreq:
qcom-hw: Update logic to detect turbo frequency")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/cpufreq/qcom-cpufreq-hw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Viresh Kumar Aug. 22, 2019, 2:40 a.m. UTC | #1
On 21-08-19, 20:14, YueHaibing wrote:
> drivers/cpufreq/qcom-cpufreq-hw.c: In function qcom_cpufreq_hw_read_lut:
> drivers/cpufreq/qcom-cpufreq-hw.c:89:38: warning:
>  variable prev_cc set but not used [-Wunused-but-set-variable]
> 
> It is not used since commit 3003e75a5045 ("cpufreq:
> qcom-hw: Update logic to detect turbo frequency")
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/cpufreq/qcom-cpufreq-hw.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
> index 3eea197..a9ae2f8 100644
> --- a/drivers/cpufreq/qcom-cpufreq-hw.c
> +++ b/drivers/cpufreq/qcom-cpufreq-hw.c
> @@ -86,7 +86,7 @@ static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev,
>  				    struct cpufreq_policy *policy,
>  				    void __iomem *base)
>  {
> -	u32 data, src, lval, i, core_count, prev_cc = 0, prev_freq = 0, freq;
> +	u32 data, src, lval, i, core_count, prev_freq = 0, freq;
>  	u32 volt;
>  	struct cpufreq_frequency_table	*table;
>  
> @@ -139,7 +139,6 @@ static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev,
>  			break;
>  		}
>  
> -		prev_cc = core_count;
>  		prev_freq = freq;
>  	}

@Sibi, you fine with this change ? I will merge it with the original patch then.
Sibi Sankar Aug. 22, 2019, 4:55 a.m. UTC | #2
@YueHaibing thanks for the patch.

On 2019-08-22 08:10, Viresh Kumar wrote:
> On 21-08-19, 20:14, YueHaibing wrote:
>> drivers/cpufreq/qcom-cpufreq-hw.c: In function 
>> qcom_cpufreq_hw_read_lut:
>> drivers/cpufreq/qcom-cpufreq-hw.c:89:38: warning:
>>  variable prev_cc set but not used [-Wunused-but-set-variable]
>> 
>> It is not used since commit 3003e75a5045 ("cpufreq:
>> qcom-hw: Update logic to detect turbo frequency")
>> 
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>>  drivers/cpufreq/qcom-cpufreq-hw.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>> 
>> diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c 
>> b/drivers/cpufreq/qcom-cpufreq-hw.c
>> index 3eea197..a9ae2f8 100644
>> --- a/drivers/cpufreq/qcom-cpufreq-hw.c
>> +++ b/drivers/cpufreq/qcom-cpufreq-hw.c
>> @@ -86,7 +86,7 @@ static int qcom_cpufreq_hw_read_lut(struct device 
>> *cpu_dev,
>>  				    struct cpufreq_policy *policy,
>>  				    void __iomem *base)
>>  {
>> -	u32 data, src, lval, i, core_count, prev_cc = 0, prev_freq = 0, 
>> freq;
>> +	u32 data, src, lval, i, core_count, prev_freq = 0, freq;
>>  	u32 volt;
>>  	struct cpufreq_frequency_table	*table;
>> 
>> @@ -139,7 +139,6 @@ static int qcom_cpufreq_hw_read_lut(struct device 
>> *cpu_dev,
>>  			break;
>>  		}
>> 
>> -		prev_cc = core_count;
>>  		prev_freq = freq;
>>  	}
> 
> @Sibi, you fine with this change ? I will merge it with the original 
> patch then.

yes the changes seem fine, I missed
removing prev_cc.
Viresh Kumar Aug. 22, 2019, 6:01 a.m. UTC | #3
On 22-08-19, 10:25, Sibi Sankar wrote:
> @YueHaibing thanks for the patch.
> 
> On 2019-08-22 08:10, Viresh Kumar wrote:
> > On 21-08-19, 20:14, YueHaibing wrote:
> > > drivers/cpufreq/qcom-cpufreq-hw.c: In function
> > > qcom_cpufreq_hw_read_lut:
> > > drivers/cpufreq/qcom-cpufreq-hw.c:89:38: warning:
> > >  variable prev_cc set but not used [-Wunused-but-set-variable]
> > > 
> > > It is not used since commit 3003e75a5045 ("cpufreq:
> > > qcom-hw: Update logic to detect turbo frequency")
> > > 
> > > Reported-by: Hulk Robot <hulkci@huawei.com>
> > > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > > ---
> > >  drivers/cpufreq/qcom-cpufreq-hw.c | 3 +--
> > >  1 file changed, 1 insertion(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c
> > > b/drivers/cpufreq/qcom-cpufreq-hw.c
> > > index 3eea197..a9ae2f8 100644
> > > --- a/drivers/cpufreq/qcom-cpufreq-hw.c
> > > +++ b/drivers/cpufreq/qcom-cpufreq-hw.c
> > > @@ -86,7 +86,7 @@ static int qcom_cpufreq_hw_read_lut(struct device
> > > *cpu_dev,
> > >  				    struct cpufreq_policy *policy,
> > >  				    void __iomem *base)
> > >  {
> > > -	u32 data, src, lval, i, core_count, prev_cc = 0, prev_freq = 0,
> > > freq;
> > > +	u32 data, src, lval, i, core_count, prev_freq = 0, freq;
> > >  	u32 volt;
> > >  	struct cpufreq_frequency_table	*table;
> > > 
> > > @@ -139,7 +139,6 @@ static int qcom_cpufreq_hw_read_lut(struct
> > > device *cpu_dev,
> > >  			break;
> > >  		}
> > > 
> > > -		prev_cc = core_count;
> > >  		prev_freq = freq;
> > >  	}
> > 
> > @Sibi, you fine with this change ? I will merge it with the original
> > patch then.
> 
> yes the changes seem fine, I missed
> removing prev_cc.

Thanks. Merged into the original patch itself.

Patch
diff mbox series

diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
index 3eea197..a9ae2f8 100644
--- a/drivers/cpufreq/qcom-cpufreq-hw.c
+++ b/drivers/cpufreq/qcom-cpufreq-hw.c
@@ -86,7 +86,7 @@  static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev,
 				    struct cpufreq_policy *policy,
 				    void __iomem *base)
 {
-	u32 data, src, lval, i, core_count, prev_cc = 0, prev_freq = 0, freq;
+	u32 data, src, lval, i, core_count, prev_freq = 0, freq;
 	u32 volt;
 	struct cpufreq_frequency_table	*table;
 
@@ -139,7 +139,6 @@  static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev,
 			break;
 		}
 
-		prev_cc = core_count;
 		prev_freq = freq;
 	}