All of lore.kernel.org
 help / color / mirror / Atom feed
From: Augusto Mecking Caringi <augustocaringi@gmail.com>
To: Zhang Rui <rui.zhang@intel.com>
Cc: Augusto Mecking Caringi <augustocaringi@gmail.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	Jacob Pan <jacob.jun.pan@linux.intel.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
Subject: [PATCH] thermal/intel_powerclamp: Remove set-but-not-used variables
Date: Mon, 30 Jan 2017 10:47:36 +0000	[thread overview]
Message-ID: <1485773289-19844-1-git-send-email-augustocaringi@gmail.com> (raw)

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;
                       ^

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)
-- 
2.7.4

             reply	other threads:[~2017-01-30 10:48 UTC|newest]

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

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=1485773289-19844-1-git-send-email-augustocaringi@gmail.com \
    --to=augustocaringi@gmail.com \
    --cc=bigeasy@linutronix.de \
    --cc=edubezval@gmail.com \
    --cc=jacob.jun.pan@linux.intel.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.