aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/nmi_selftest.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-06-19 13:53:04 +0300
committerIngo Molnar <mingo@kernel.org>2017-06-20 12:52:43 +0200
commitc133c7615751008f6c32ccae7cdfc5ff6e989c35 (patch)
tree398b68e505936869dd5f79d74e6f68e2798d5d0e /arch/x86/kernel/nmi_selftest.c
parentMerge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux (diff)
downloadlinux-dev-c133c7615751008f6c32ccae7cdfc5ff6e989c35.tar.xz
linux-dev-c133c7615751008f6c32ccae7cdfc5ff6e989c35.zip
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>
Diffstat (limited to 'arch/x86/kernel/nmi_selftest.c')
-rw-r--r--arch/x86/kernel/nmi_selftest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/nmi_selftest.c b/arch/x86/kernel/nmi_selftest.c
index 6d9582ec0324..d27f8d84c4ff 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?? */