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>
This commit is contained in:
parent
5b53b76a61
commit
0c33cacd86
1 changed files with 5 additions and 3 deletions
|
@ -67,17 +67,19 @@ int __init kmemcheck_init(void)
|
||||||
early_initcall(kmemcheck_init);
|
early_initcall(kmemcheck_init);
|
||||||
|
|
||||||
#ifdef CONFIG_KMEMCHECK_DISABLED_BY_DEFAULT
|
#ifdef CONFIG_KMEMCHECK_DISABLED_BY_DEFAULT
|
||||||
int kmemcheck_enabled = 0;
|
# define KMEMCHECK_ENABLED 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_KMEMCHECK_ENABLED_BY_DEFAULT
|
#ifdef CONFIG_KMEMCHECK_ENABLED_BY_DEFAULT
|
||||||
int kmemcheck_enabled = 1;
|
# define KMEMCHECK_ENABLED 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_KMEMCHECK_ONESHOT_BY_DEFAULT
|
#ifdef CONFIG_KMEMCHECK_ONESHOT_BY_DEFAULT
|
||||||
int kmemcheck_enabled = 2;
|
# define KMEMCHECK_ENABLED 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int kmemcheck_enabled = KMEMCHECK_ENABLED;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We need to parse the kmemcheck= option before any memory is allocated.
|
* We need to parse the kmemcheck= option before any memory is allocated.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue