]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
printk: Move locking annotation to printk.c
authorMarco Elver <elver@google.com>
Fri, 19 Dec 2025 15:40:22 +0000 (16:40 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 5 Jan 2026 15:43:36 +0000 (16:43 +0100)
commit8ec56d9aaba9667b0c6429de7aeb4ec691944a5e
tree1a4a4d92e15df015d21dcb1eeaac7a936682540e
parent322366b8f13a8cafe169dc1dc6f6ec0d82ff8734
printk: Move locking annotation to printk.c

With Sparse support gone, Clang is a bit more strict and warns:

./include/linux/console.h:492:50: error: use of undeclared identifier 'console_mutex'
  492 | extern void console_list_unlock(void) __releases(console_mutex);

Since it does not make sense to make console_mutex itself global, move
the annotation to printk.c. Context analysis remains disabled for
printk.c.

This is needed to enable context analysis for modules that include
<linux/console.h>.

Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20251219154418.3592607-34-elver@google.com
include/linux/console.h
kernel/printk/printk.c