diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-02-26 11:17:31 +0200 |
---|---|---|
committer | Vegard Nossum <vegard.nossum@gmail.com> | 2009-06-15 12:39:57 +0200 |
commit | 0c33cacd8672ef034ba414510f71ea2bd9370111 (patch) | |
tree | 29a2ea85f2efe333fa34c64b5c00fa5fc11e9116 | |
parent | 5b53b76a6158cd831759d7b0b2585bf0b121cec2 (diff) |
kmemcheck: remove multiple ifdef'd definitions of the same global variable
Multiple ifdef'd definitions of the same global variable is ugly and
error-prone. Fix that up.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
-rw-r--r-- | arch/x86/mm/kmemcheck/kmemcheck.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/mm/kmemcheck/kmemcheck.c b/arch/x86/mm/kmemcheck/kmemcheck.c index f03ee91ac469..a644f248451b 100644 --- a/arch/x86/mm/kmemcheck/kmemcheck.c +++ b/arch/x86/mm/kmemcheck/kmemcheck.c @@ -67,17 +67,19 @@ int __init kmemcheck_init(void) early_initcall(kmemcheck_init); #ifdef CONFIG_KMEMCHECK_DISABLED_BY_DEFAULT -int kmemcheck_enabled = 0; +# define KMEMCHECK_ENABLED 0 #endif #ifdef CONFIG_KMEMCHECK_ENABLED_BY_DEFAULT -int kmemcheck_enabled = 1; +# define KMEMCHECK_ENABLED 1 #endif #ifdef CONFIG_KMEMCHECK_ONESHOT_BY_DEFAULT -int kmemcheck_enabled = 2; +# define KMEMCHECK_ENABLED 2 #endif +int kmemcheck_enabled = KMEMCHECK_ENABLED; + /* * We need to parse the kmemcheck= option before any memory is allocated. */ |