[patch 3/5] x86: nmi_watchdog - remove useless check

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <mingo@...>, <tglx@...>, <hpa@...>, <macro@...>
Cc: Cyrill Gorcunov <gorcunov@...>, <linux-kernel@...>
Date: Wednesday, December 31, 1969 - 8:00 pm

Since nmi_watchdog is unsigned variable we may
safely remove the check for negative value

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---

Index: linux-2.6.git/arch/x86/kernel/nmi.c
====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/nmi.c	2008-06-22 23:02:50.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/nmi.c	2008-06-23 20:02:47.000000000 +0400
@@ -186,7 +186,7 @@ error:
 
 static int __init setup_nmi_watchdog(char *str)
 {
-	int nmi;
+	unsigned int nmi;
 
 	if (!strncmp(str, "panic", 5)) {
 		panic_on_timeout = 1;
@@ -198,7 +198,7 @@ static int __init setup_nmi_watchdog(cha
 
 	get_option(&str, &nmi);
 
-	if (nmi >= NMI_INVALID || nmi < NMI_NONE)
+	if (nmi >= NMI_INVALID)
 		return 0;
 
 	nmi_watchdog = nmi;

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] net/core/flow.c: compare data with memcmp, David Miller, (Mon Jan 1, 4:49 am)
[patch 3/5] x86: nmi_watchdog - remove useless check, Cyrill Gorcunov, (Wed Dec 31, 8:00 pm)