Skip to content

Commit

Permalink
kmemcheck: remove multiple ifdef'd definitions of the same global var…
Browse files Browse the repository at this point in the history
…iable

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>
  • Loading branch information
Pekka Enberg authored and Vegard Nossum committed Jun 15, 2009
1 parent 5b53b76 commit 0c33cac
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions arch/x86/mm/kmemcheck/kmemcheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 0c33cac

Please sign in to comment.