Commit-ID:  c2ace36b884de9330c4149064ae8d212d2e0d9ee
Gitweb:     http://git.kernel.org/tip/c2ace36b884de9330c4149064ae8d212d2e0d9ee
Author:     Pan Xinhui <[email protected]>
AuthorDate: Wed, 13 Jul 2016 18:23:34 +0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Wed, 10 Aug 2016 14:13:29 +0200

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 <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Waiman Long <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Paul E. McKenney <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: 
http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
 kernel/locking/qspinlock_stat.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/locking/qspinlock_stat.h b/kernel/locking/qspinlock_stat.h
index 22e0253..b9d0315 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,
                 */
                if ((counter == qstat_pv_latency_kick) ||
                    (counter == qstat_pv_latency_wake)) {
-                       stat = 0;
                        if (kicks)
                                stat = DIV_ROUND_CLOSEST_ULL(stat, kicks);
                }

Reply via email to