diff options
| author | Marco Elver <elver@google.com> | 2025-12-19 16:40:22 +0100 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2026-01-05 16:43:36 +0100 |
| commit | 8ec56d9aaba9667b0c6429de7aeb4ec691944a5e (patch) | |
| tree | 1a4a4d92e15df015d21dcb1eeaac7a936682540e /include/linux/console.h | |
| parent | 322366b8f13a8cafe169dc1dc6f6ec0d82ff8734 (diff) | |
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
Diffstat (limited to 'include/linux/console.h')
| -rw-r--r-- | include/linux/console.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/console.h b/include/linux/console.h index fc9f5c5c1b04..f882833bedf0 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -492,8 +492,8 @@ static inline bool console_srcu_read_lock_is_held(void) extern int console_srcu_read_lock(void); extern void console_srcu_read_unlock(int cookie); -extern void console_list_lock(void) __acquires(console_mutex); -extern void console_list_unlock(void) __releases(console_mutex); +extern void console_list_lock(void); +extern void console_list_unlock(void); extern struct hlist_head console_list; |
