diff options
author | Pan Xinhui <xinhui.pan@linux.vnet.ibm.com> | 2016-07-13 06:23:34 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-08-10 08:13:29 -0400 |
commit | c2ace36b884de9330c4149064ae8d212d2e0d9ee (patch) | |
tree | bd9ffc016134a9315c1d8b65502483298b6a0238 | |
parent | 229ce631574761870a2ac938845fadbd07f35caa (diff) |
locking/pvqspinlock: Fix a bug in qstat_read()
It's obviously wrong to set stat to NULL. So lets remove it.
Otherwise it is always zero when we check the latency of kick/wake.
Signed-off-by: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Waiman Long <Waiman.Long@hpe.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1468405414-3700-1-git-send-email-xinhui.pan@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | kernel/locking/qspinlock_stat.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/locking/qspinlock_stat.h b/kernel/locking/qspinlock_stat.h index 22e025309845..b9d031516254 100644 --- a/kernel/locking/qspinlock_stat.h +++ b/kernel/locking/qspinlock_stat.h | |||
@@ -153,7 +153,6 @@ static ssize_t qstat_read(struct file *file, char __user *user_buf, | |||
153 | */ | 153 | */ |
154 | if ((counter == qstat_pv_latency_kick) || | 154 | if ((counter == qstat_pv_latency_kick) || |
155 | (counter == qstat_pv_latency_wake)) { | 155 | (counter == qstat_pv_latency_wake)) { |
156 | stat = 0; | ||
157 | if (kicks) | 156 | if (kicks) |
158 | stat = DIV_ROUND_CLOSEST_ULL(stat, kicks); | 157 | stat = DIV_ROUND_CLOSEST_ULL(stat, kicks); |
159 | } | 158 | } |