Skip to content

Commit add6b92

Browse files
committed
Merge tag 'locking-urgent-2021-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking fixlets from Ingo Molnar: "Two minor fixes: one for a Clang warning, the other improves an ambiguous/confusing kernel log message" * tag 'locking-urgent-2021-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: lockdep: Address clang -Wformat warning printing for %hd lockdep: Add a missing initialization hint to the "INFO: Trying to register non-static key" message
2 parents 06f838e + 6d48b79 commit add6b92

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

kernel/locking/lockdep.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ static void print_lock_name(struct lock_class *class)
705705

706706
printk(KERN_CONT " (");
707707
__print_lock_name(class);
708-
printk(KERN_CONT "){%s}-{%hd:%hd}", usage,
708+
printk(KERN_CONT "){%s}-{%d:%d}", usage,
709709
class->wait_type_outer ?: class->wait_type_inner,
710710
class->wait_type_inner);
711711
}
@@ -930,7 +930,8 @@ static bool assign_lock_key(struct lockdep_map *lock)
930930
/* Debug-check: all keys must be persistent! */
931931
debug_locks_off();
932932
pr_err("INFO: trying to register non-static key.\n");
933-
pr_err("the code is fine but needs lockdep annotation.\n");
933+
pr_err("The code is fine but needs lockdep annotation, or maybe\n");
934+
pr_err("you didn't initialize this object before use?\n");
934935
pr_err("turning off the locking correctness validator.\n");
935936
dump_stack();
936937
return false;

0 commit comments

Comments
 (0)