diff options
author | Augusto Mecking Caringi <augustocaringi@gmail.com> | 2017-01-30 05:47:36 -0500 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2017-02-06 22:38:28 -0500 |
commit | da8c1c46f2082ce4a094812806d7eab3c17a4817 (patch) | |
tree | 0a725cc9864c3ba99d5bcb05decfe4d2b5f5f97f | |
parent | d5adbfcd5f7bcc6fa58a41c5c5ada0e5c826ce2c (diff) |
thermal/intel_powerclamp: Remove set-but-not-used variables
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>
Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-rw-r--r-- | drivers/thermal/intel_powerclamp.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/thermal/intel_powerclamp.c b/drivers/thermal/intel_powerclamp.c index df64692e9e64..a47103a659fa 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) | |||
461 | { | 461 | { |
462 | static u64 msr_last; | 462 | static u64 msr_last; |
463 | static u64 tsc_last; | 463 | static u64 tsc_last; |
464 | static unsigned long jiffies_last; | ||
465 | 464 | ||
466 | u64 msr_now; | 465 | u64 msr_now; |
467 | unsigned long jiffies_now; | ||
468 | u64 tsc_now; | 466 | u64 tsc_now; |
469 | u64 val64; | 467 | u64 val64; |
470 | 468 | ||
471 | msr_now = pkg_state_counter(); | 469 | msr_now = pkg_state_counter(); |
472 | tsc_now = rdtsc(); | 470 | tsc_now = rdtsc(); |
473 | jiffies_now = jiffies; | ||
474 | 471 | ||
475 | /* calculate pkg cstate vs tsc ratio */ | 472 | /* calculate pkg cstate vs tsc ratio */ |
476 | if (!msr_last || !tsc_last) | 473 | if (!msr_last || !tsc_last) |
@@ -485,7 +482,6 @@ static void poll_pkg_cstate(struct work_struct *dummy) | |||
485 | 482 | ||
486 | /* update record */ | 483 | /* update record */ |
487 | msr_last = msr_now; | 484 | msr_last = msr_now; |
488 | jiffies_last = jiffies_now; | ||
489 | tsc_last = tsc_now; | 485 | tsc_last = tsc_now; |
490 | 486 | ||
491 | if (true == clamping) | 487 | if (true == clamping) |