Skip to content

Commit 40193fb

Browse files
committed
synch: print held synch objects generically
Signed-off-by: Josef 'Jeff' Sipek <[email protected]>
1 parent 8b25c2c commit 40193fb

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

synch.c

+4-9
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,6 @@ static void print_invalid_call(const char *fxn, const struct lock_context *where
142142
where->line);
143143
}
144144

145-
#define GENERATE_LOCK_MASK_ARGS(i) \
146-
((i)->magic != (uintptr_t) (i)) ? 'M' : '.'
147-
#define GENERATE_RW_MASK_ARGS(l) \
148-
((l)->info.magic != (uintptr_t) &(l)->info) ? 'M' : '.'
149-
#define GENERATE_COND_MASK_ARGS(c) \
150-
((c)->info.magic != (uintptr_t) &(c)->info) ? 'M' : '.'
151-
152145
static void print_synch_as(struct lock_info *info,
153146
const struct lock_context *where,
154147
enum synch_type type)
@@ -198,11 +191,13 @@ static void print_held_locks(struct held_lock *highlight)
198191
for_each_held_lock(i, cur) {
199192
struct lock_info *info = cur->info;
200193
struct lock *lock = container_of(info, struct lock, info);
194+
char synch_chars[2];
201195

202-
cmn_err(CE_CRIT, "lockdep: %s #%zd: %s (%p) <%c> acquired at %s:%d",
196+
cmn_err(CE_CRIT, "lockdep: %s #%zd: %s (%p) %s <%s> acquired at %s:%d",
203197
(cur == highlight) ? "->" : " ",
204198
i, info->name, lock,
205-
GENERATE_LOCK_MASK_ARGS(info),
199+
synch_type_str(info->type),
200+
get_synch_chars(info, synch_chars),
206201
cur->where.file, cur->where.line);
207202
}
208203
}

0 commit comments

Comments
 (0)