mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Dan Carpenter <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: dzickus@redhat.com, dan.carpenter@oracle.com,
	peterz@infradead.org, tglx@linutronix.de, mingo@kernel.org,
	hpa@zytor.com, linux-kernel@vger.kernel.org,
	torvalds@linux-foundation.org
Subject: [tip:x86/debug] x86/nmi: Fix timeout test in test_nmi_ipi()
Date: Tue, 20 Jun 2017 06:28:00 -0700	[thread overview]
Message-ID: <tip-c133c7615751008f6c32ccae7cdfc5ff6e989c35@git.kernel.org> (raw)
In-Reply-To: <20170619105304.GA23995@elgon.mountain>

Commit-ID:  c133c7615751008f6c32ccae7cdfc5ff6e989c35
Gitweb:     http://git.kernel.org/tip/c133c7615751008f6c32ccae7cdfc5ff6e989c35
Author:     Dan Carpenter <dan.carpenter@oracle.com>
AuthorDate: Mon, 19 Jun 2017 13:53:04 +0300
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 20 Jun 2017 12:52:43 +0200

x86/nmi: Fix timeout test in test_nmi_ipi()

We're supposed to exit the loop with "timeout" set to zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Don Zickus <dzickus@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: kernel-janitors@vger.kernel.org
Fixes: 99e8b9ca90d6 ("x86, NMI: Add NMI IPI selftest")
Link: http://lkml.kernel.org/r/20170619105304.GA23995@elgon.mountain
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/nmi_selftest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/nmi_selftest.c b/arch/x86/kernel/nmi_selftest.c
index 6d9582e..d27f8d8 100644
--- a/arch/x86/kernel/nmi_selftest.c
+++ b/arch/x86/kernel/nmi_selftest.c
@@ -78,7 +78,7 @@ static void __init test_nmi_ipi(struct cpumask *mask)
 
 	/* Don't wait longer than a second */
 	timeout = USEC_PER_SEC;
-	while (!cpumask_empty(mask) && timeout--)
+	while (!cpumask_empty(mask) && --timeout)
 	        udelay(1);
 
 	/* What happens if we timeout, do we still unregister?? */

           reply	other threads:[~2017-06-20 13:31 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20170619105304.GA23995@elgon.mountain>]

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-c133c7615751008f6c32ccae7cdfc5ff6e989c35@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dzickus@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome