Linux-PM Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH -next] cpufreq: qcom-hw: remove set but not used variable 'prev_cc'
@ 2019-08-21 12:14 YueHaibing
  2019-08-22  2:40 ` Viresh Kumar
  0 siblings, 1 reply; 4+ messages in thread
From: YueHaibing @ 2019-08-21 12:14 UTC (permalink / raw)
  To: agross, rjw, viresh.kumar, sibis
  Cc: linux-kernel, linux-pm, linux-arm-msm, YueHaibing

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;
 	}
 
-- 
2.7.4



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] cpufreq: qcom-hw: remove set but not used variable 'prev_cc'
  2019-08-21 12:14 [PATCH -next] cpufreq: qcom-hw: remove set but not used variable 'prev_cc' YueHaibing
@ 2019-08-22  2:40 ` Viresh Kumar
  2019-08-22  4:55   ` Sibi Sankar
  0 siblings, 1 reply; 4+ messages in thread
From: Viresh Kumar @ 2019-08-22  2:40 UTC (permalink / raw)
  To: YueHaibing; +Cc: agross, rjw, sibis, linux-kernel, linux-pm, linux-arm-msm

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.

-- 
viresh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] cpufreq: qcom-hw: remove set but not used variable 'prev_cc'
  2019-08-22  2:40 ` Viresh Kumar
@ 2019-08-22  4:55   ` Sibi Sankar
  2019-08-22  6:01     ` Viresh Kumar
  0 siblings, 1 reply; 4+ messages in thread
From: Sibi Sankar @ 2019-08-22  4:55 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: YueHaibing, agross, rjw, linux-kernel, linux-pm, linux-arm-msm,
	linux-arm-msm-owner

@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.

-- 
-- Sibi Sankar --
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] cpufreq: qcom-hw: remove set but not used variable 'prev_cc'
  2019-08-22  4:55   ` Sibi Sankar
@ 2019-08-22  6:01     ` Viresh Kumar
  0 siblings, 0 replies; 4+ messages in thread
From: Viresh Kumar @ 2019-08-22  6:01 UTC (permalink / raw)
  To: Sibi Sankar
  Cc: YueHaibing, agross, rjw, linux-kernel, linux-pm, linux-arm-msm,
	linux-arm-msm-owner

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.

-- 
viresh

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-21 12:14 [PATCH -next] cpufreq: qcom-hw: remove set but not used variable 'prev_cc' YueHaibing
2019-08-22  2:40 ` Viresh Kumar
2019-08-22  4:55   ` Sibi Sankar
2019-08-22  6:01     ` Viresh Kumar

Linux-PM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pm/0 linux-pm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pm linux-pm/ https://lore.kernel.org/linux-pm \
		linux-pm@vger.kernel.org linux-pm@archiver.kernel.org
	public-inbox-index linux-pm


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pm


AGPL code for this site: git clone https://public-inbox.org/ public-inbox