lockdep: Add a missing initialization hint to the "INFO: Trying to register non-static key" message

Since this message is printed when dynamically allocated spinlocks (e.g.
kzalloc()) are used without initialization (e.g. spin_lock_init()),
suggest to developers to check whether initialization functions for objects
were called, before making developers wonder what annotation is missing.

[ mingo: Minor tweaks to the message. ]

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210321064913.4619-1-penguin-kernel@I-love.SAKURA.ne.jp
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by Tetsuo Handa and committed by Ingo Molnar 3a85969e 2dc0572f

Changed files
+2 -1
kernel
locking
+2 -1
kernel/locking/lockdep.c
··· 930 930 /* Debug-check: all keys must be persistent! */ 931 931 debug_locks_off(); 932 932 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"); 934 935 pr_err("turning off the locking correctness validator.\n"); 935 936 dump_stack(); 936 937 return false;