diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-01-29 08:50:36 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-14 17:28:26 -0500 |
commit | b4b136f44b3b7adb9265fd5566d0ea9b99b1cd5f (patch) | |
tree | 5d4b96e8d93903908828fab9850805e172bb7259 /kernel | |
parent | 4f367d8adca947bed4385740a13d1efb1a06fba1 (diff) |
lockdep: use stringify.h
Arnd pointed out we have the stringify macro magic already in-kernel.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
CC: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/lockdep.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 42dfc28d12cc..fc84a30483c2 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/utsname.h> | 41 | #include <linux/utsname.h> |
42 | #include <linux/hash.h> | 42 | #include <linux/hash.h> |
43 | #include <linux/ftrace.h> | 43 | #include <linux/ftrace.h> |
44 | #include <linux/stringify.h> | ||
44 | 45 | ||
45 | #include <asm/sections.h> | 46 | #include <asm/sections.h> |
46 | 47 | ||
@@ -445,14 +446,11 @@ atomic_t nr_find_usage_backwards_recursions; | |||
445 | * Locking printouts: | 446 | * Locking printouts: |
446 | */ | 447 | */ |
447 | 448 | ||
448 | #define __STR(foo) #foo | ||
449 | #define STR(foo) __STR(foo) | ||
450 | |||
451 | #define __USAGE(__STATE) \ | 449 | #define __USAGE(__STATE) \ |
452 | [LOCK_USED_IN_##__STATE] = "IN-"STR(__STATE)"-W", \ | 450 | [LOCK_USED_IN_##__STATE] = "IN-"__stringify(__STATE)"-W", \ |
453 | [LOCK_ENABLED_##__STATE] = STR(__STATE)"-ON-W", \ | 451 | [LOCK_ENABLED_##__STATE] = __stringify(__STATE)"-ON-W", \ |
454 | [LOCK_USED_IN_##__STATE##_READ] = "IN-"STR(__STATE)"-R", \ | 452 | [LOCK_USED_IN_##__STATE##_READ] = "IN-"__stringify(__STATE)"-R",\ |
455 | [LOCK_ENABLED_##__STATE##_READ] = STR(__STATE)"-ON-R", | 453 | [LOCK_ENABLED_##__STATE##_READ] = __stringify(__STATE)"-ON-R", |
456 | 454 | ||
457 | static const char *usage_str[] = | 455 | static const char *usage_str[] = |
458 | { | 456 | { |
@@ -1270,14 +1268,14 @@ check_usage(struct task_struct *curr, struct held_lock *prev, | |||
1270 | 1268 | ||
1271 | static const char *state_names[] = { | 1269 | static const char *state_names[] = { |
1272 | #define LOCKDEP_STATE(__STATE) \ | 1270 | #define LOCKDEP_STATE(__STATE) \ |
1273 | STR(__STATE), | 1271 | __stringify(__STATE), |
1274 | #include "lockdep_states.h" | 1272 | #include "lockdep_states.h" |
1275 | #undef LOCKDEP_STATE | 1273 | #undef LOCKDEP_STATE |
1276 | }; | 1274 | }; |
1277 | 1275 | ||
1278 | static const char *state_rnames[] = { | 1276 | static const char *state_rnames[] = { |
1279 | #define LOCKDEP_STATE(__STATE) \ | 1277 | #define LOCKDEP_STATE(__STATE) \ |
1280 | STR(__STATE)"-READ", | 1278 | __stringify(__STATE)"-READ", |
1281 | #include "lockdep_states.h" | 1279 | #include "lockdep_states.h" |
1282 | #undef LOCKDEP_STATE | 1280 | #undef LOCKDEP_STATE |
1283 | }; | 1281 | }; |