aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/lockdep.c16
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
457static const char *usage_str[] = 455static const char *usage_str[] =
458{ 456{
@@ -1270,14 +1268,14 @@ check_usage(struct task_struct *curr, struct held_lock *prev,
1270 1268
1271static const char *state_names[] = { 1269static 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
1278static const char *state_rnames[] = { 1276static 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};