All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Pan Xinhui <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
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
Subject: [tip:locking/core] locking/pvqspinlock: Fix a bug in qstat_read()
Date: Wed, 10 Aug 2016 11:06:10 -0700	[thread overview]
Message-ID: <tip-c2ace36b884de9330c4149064ae8d212d2e0d9ee@git.kernel.org> (raw)
In-Reply-To: <1468405414-3700-1-git-send-email-xinhui.pan@linux.vnet.ibm.com>

Commit-ID:  c2ace36b884de9330c4149064ae8d212d2e0d9ee
Gitweb:     http://git.kernel.org/tip/c2ace36b884de9330c4149064ae8d212d2e0d9ee
Author:     Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
AuthorDate: Wed, 13 Jul 2016 18:23:34 +0800
Committer:  Ingo Molnar <mingo@kernel.org>
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 <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>
---
 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);
 		}

      parent reply	other threads:[~2016-08-10 21:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 10:23 [PATCH] locking/pvqspinlock: Fix a bug in qstat_read() Pan Xinhui
2016-07-13 13:50 ` Waiman Long
2016-08-10 18:06 ` tip-bot for Pan Xinhui [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-c2ace36b884de9330c4149064ae8d212d2e0d9ee@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=Waiman.Long@hpe.com \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=xinhui.pan@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.