From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933511AbcHJVQQ (ORCPT ); Wed, 10 Aug 2016 17:16:16 -0400 Received: from terminus.zytor.com ([198.137.202.10]:56202 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750909AbcHJSGk (ORCPT ); Wed, 10 Aug 2016 14:06:40 -0400 Date: Wed, 10 Aug 2016 11:06:10 -0700 From: tip-bot for Pan Xinhui Message-ID: Cc: torvalds@linux-foundation.org, paulmck@linux.vnet.ibm.com, peterz@infradead.org, Waiman.Long@hpe.com, hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@kernel.org, akpm@linux-foundation.org, tglx@linutronix.de, xinhui.pan@linux.vnet.ibm.com Reply-To: xinhui.pan@linux.vnet.ibm.com, Waiman.Long@hpe.com, hpa@zytor.com, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, tglx@linutronix.de, mingo@kernel.org, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@linux.vnet.ibm.com In-Reply-To: <1468405414-3700-1-git-send-email-xinhui.pan@linux.vnet.ibm.com> References: <1468405414-3700-1-git-send-email-xinhui.pan@linux.vnet.ibm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] locking/pvqspinlock: Fix a bug in qstat_read() Git-Commit-ID: c2ace36b884de9330c4149064ae8d212d2e0d9ee X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: c2ace36b884de9330c4149064ae8d212d2e0d9ee Gitweb: http://git.kernel.org/tip/c2ace36b884de9330c4149064ae8d212d2e0d9ee Author: Pan Xinhui AuthorDate: Wed, 13 Jul 2016 18:23:34 +0800 Committer: Ingo Molnar 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 Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Waiman Long Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1468405414-3700-1-git-send-email-xinhui.pan@linux.vnet.ibm.com Signed-off-by: Ingo Molnar --- 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); }