diff options
| author | Marco Elver <elver@google.com> | 2025-12-19 16:40:12 +0100 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2026-01-05 16:43:33 +0100 |
| commit | 5b63d0ae94ccfd64dcbdb693d88eb3650eb3c64c (patch) | |
| tree | 884fc22791182b23e40060eebfd2eac59e07b67c /include/linux/rcupdate.h | |
| parent | 4f109baeea4dc6fa1426ab559159d3bb35e05343 (diff) | |
compiler-context-analysis: Remove Sparse support
Remove Sparse support as discussed at [1].
The kernel codebase is still scattered with numerous places that try to
appease Sparse's context tracking ("annotation for sparse", "fake out
sparse", "work around sparse", etc.). Eventually, as more subsystems
enable Clang's context analysis, these places will show up and need
adjustment or removal of the workarounds altogether.
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/all/20250207083335.GW7145@noisy.programming.kicks-ass.net/ [1]
Link: https://lore.kernel.org/all/Z6XTKTo_LMj9KmbY@elver.google.com/ [2]
Link: https://patch.msgid.link/20251219154418.3592607-24-elver@google.com
Diffstat (limited to 'include/linux/rcupdate.h')
| -rw-r--r-- | include/linux/rcupdate.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 50e63eade019..d828a4673441 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -1219,20 +1219,7 @@ rcu_head_after_call_rcu(struct rcu_head *rhp, rcu_callback_t f) extern int rcu_expedited; extern int rcu_normal; -DEFINE_LOCK_GUARD_0(rcu, - do { - rcu_read_lock(); - /* - * sparse doesn't call the cleanup function, - * so just release immediately and don't track - * the context. We don't need to anyway, since - * the whole point of the guard is to not need - * the explicit unlock. - */ - __release(RCU); - } while (0), - rcu_read_unlock()) - +DEFINE_LOCK_GUARD_0(rcu, rcu_read_lock(), rcu_read_unlock()) DECLARE_LOCK_GUARD_0_ATTRS(rcu, __acquires_shared(RCU), __releases_shared(RCU)) #endif /* __LINUX_RCUPDATE_H */ |
