diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-02-26 04:17:31 -0500 |
---|---|---|
committer | Vegard Nossum <vegard.nossum@gmail.com> | 2009-06-15 06:39:57 -0400 |
commit | 0c33cacd8672ef034ba414510f71ea2bd9370111 (patch) | |
tree | 29a2ea85f2efe333fa34c64b5c00fa5fc11e9116 /arch | |
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>
Diffstat (limited to 'arch')
-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) | |||
67 | early_initcall(kmemcheck_init); | 67 | early_initcall(kmemcheck_init); |
68 | 68 | ||
69 | #ifdef CONFIG_KMEMCHECK_DISABLED_BY_DEFAULT | 69 | #ifdef CONFIG_KMEMCHECK_DISABLED_BY_DEFAULT |
70 | int kmemcheck_enabled = 0; | 70 | # define KMEMCHECK_ENABLED 0 |
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | #ifdef CONFIG_KMEMCHECK_ENABLED_BY_DEFAULT | 73 | #ifdef CONFIG_KMEMCHECK_ENABLED_BY_DEFAULT |
74 | int kmemcheck_enabled = 1; | 74 | # define KMEMCHECK_ENABLED 1 |
75 | #endif | 75 | #endif |
76 | 76 | ||
77 | #ifdef CONFIG_KMEMCHECK_ONESHOT_BY_DEFAULT | 77 | #ifdef CONFIG_KMEMCHECK_ONESHOT_BY_DEFAULT |
78 | int kmemcheck_enabled = 2; | 78 | # define KMEMCHECK_ENABLED 2 |
79 | #endif | 79 | #endif |
80 | 80 | ||
81 | int kmemcheck_enabled = KMEMCHECK_ENABLED; | ||
82 | |||
81 | /* | 83 | /* |
82 | * We need to parse the kmemcheck= option before any memory is allocated. | 84 | * We need to parse the kmemcheck= option before any memory is allocated. |
83 | */ | 85 | */ |