All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Pan <jacob.jun.pan@linux.intel.com>
To: Augusto Mecking Caringi <augustocaringi@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Petr Mladek <pmladek@suse.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	jacob.jun.pan@linux.intel.com
Subject: Re: [PATCH] thermal/intel_powerclamp: Remove set-but-not-used variables
Date: Tue, 31 Jan 2017 08:22:41 -0800	[thread overview]
Message-ID: <20170131082241.00d093fb@jacob-builder> (raw)
In-Reply-To: <1485773289-19844-1-git-send-email-augustocaringi@gmail.com>

On Mon, 30 Jan 2017 10:47:36 +0000
Augusto Mecking Caringi <augustocaringi@gmail.com> wrote:

> In poll_pkg_cstate() function, the variables jiffies_last and
> jiffies_now are set but never used.
> 
> This has been detected by building the driver with W=1:
> 
> drivers/thermal/intel_powerclamp.c: In function ‘poll_pkg_cstate’:
> drivers/thermal/intel_powerclamp.c:464:23: warning: variable
> ‘jiffies_last’ set but not used [-Wunused-but-set-variable]
> static unsigned long jiffies_last;
>                        ^
> 
Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>

Thanks,
> Signed-off-by: Augusto Mecking Caringi <augustocaringi@gmail.com>
> ---
>  drivers/thermal/intel_powerclamp.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/thermal/intel_powerclamp.c
> b/drivers/thermal/intel_powerclamp.c index df64692..a47103a 100644
> --- a/drivers/thermal/intel_powerclamp.c
> +++ b/drivers/thermal/intel_powerclamp.c
> @@ -461,16 +461,13 @@ static void poll_pkg_cstate(struct work_struct
> *dummy) {
>  	static u64 msr_last;
>  	static u64 tsc_last;
> -	static unsigned long jiffies_last;
>  
>  	u64 msr_now;
> -	unsigned long jiffies_now;
>  	u64 tsc_now;
>  	u64 val64;
>  
>  	msr_now = pkg_state_counter();
>  	tsc_now = rdtsc();
> -	jiffies_now = jiffies;
>  
>  	/* calculate pkg cstate vs tsc ratio */
>  	if (!msr_last || !tsc_last)
> @@ -485,7 +482,6 @@ static void poll_pkg_cstate(struct work_struct
> *dummy) 
>  	/* update record */
>  	msr_last = msr_now;
> -	jiffies_last = jiffies_now;
>  	tsc_last = tsc_now;
>  
>  	if (true == clamping)

[Jacob Pan]

      reply	other threads:[~2017-01-31 16:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-30 10:47 [PATCH] thermal/intel_powerclamp: Remove set-but-not-used variables Augusto Mecking Caringi
2017-01-31 16:22 ` Jacob Pan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170131082241.00d093fb@jacob-builder \
    --to=jacob.jun.pan@linux.intel.com \
    --cc=augustocaringi@gmail.com \
    --cc=bigeasy@linutronix.de \
    --cc=edubezval@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.