Skip to contentSkip to conversation

x86: remove impossible test in mtrr/main.c

PATCH Applied Rusty Russell 3 participants 3 messages Dec 25, 2008 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: remove impossible test in mtrr/main.c

Impact: cleanup

enable_mtrr_cleanup is static, and is never set to anything but 0 or 1.

arch/x86/kernel/cpu/mtrr/main.c +2 -4
@@ -823,16 +823,14 @@ static int enable_mtrr_cleanup __initdat
 
 static int __init disable_mtrr_cleanup_setup(char *str)
 {
-	if (enable_mtrr_cleanup != -1)
-		enable_mtrr_cleanup = 0;
+	enable_mtrr_cleanup = 0;
 	return 0;
 }
 early_param("disable_mtrr_cleanup", disable_mtrr_cleanup_setup);
 
 static int __init enable_mtrr_cleanup_setup(char *str)
 {
-	if (enable_mtrr_cleanup != -1)
-		enable_mtrr_cleanup = 1;
+	enable_mtrr_cleanup = 1;
 	return 0;
 }
 early_param("enable_mtrr_cleanup", enable_mtrr_cleanup_setup);
reviewer Applied
#1 lore raw
Quoted 5 lines · Rusty Russell

Impact: cleanup

enable_mtrr_cleanup is static, and is never set to anything but 0 or 1.

Applied to tip:x86/pat2, thanks!

-hpa

Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.
#2 lore raw
Quoted 9 lines · H. Peter Anvin
Quoted 5 lines · Rusty Russell

Impact: cleanup

enable_mtrr_cleanup is static, and is never set to anything but 0 or 1.

Applied to tip:x86/pat2, thanks!

I meant tip:x86/cleanups, of course.

-hpa