提交 da8c1c46 编写于 作者: A Augusto Mecking Caringi 提交者: Zhang Rui

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: NAugusto Mecking Caringi <augustocaringi@gmail.com>
Acked-by: NJacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: NZhang Rui <rui.zhang@intel.com>
上级 d5adbfcd
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册