Skip to content

Commit 2bd9b57

Browse files
compudjrostedt
authored andcommitted
tracing: Use guard() rather than scoped_guard()
Using scoped_guard() in the implementation of trace_##name() adds an unnecessary level of indentation. Cc: Steven Rostedt <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Michael Jeanson <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Yonghong Song <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Andrii Nakryiko <[email protected]> Cc: [email protected] Cc: Joel Fernandes <[email protected]> Cc: Jordan Rife <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Mathieu Desnoyers <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent ef0d418 commit 2bd9b57

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/linux/tracepoint.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
259259
{ \
260260
if (static_branch_unlikely(&__tracepoint_##name.key)) { \
261261
if (cond) { \
262-
scoped_guard(preempt_notrace) \
263-
__DO_TRACE_CALL(name, TP_ARGS(args)); \
262+
guard(preempt_notrace)(); \
263+
__DO_TRACE_CALL(name, TP_ARGS(args)); \
264264
} \
265265
} \
266266
if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) { \
@@ -275,8 +275,8 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
275275
{ \
276276
might_fault(); \
277277
if (static_branch_unlikely(&__tracepoint_##name.key)) { \
278-
scoped_guard(rcu_tasks_trace) \
279-
__DO_TRACE_CALL(name, TP_ARGS(args)); \
278+
guard(rcu_tasks_trace)(); \
279+
__DO_TRACE_CALL(name, TP_ARGS(args)); \
280280
} \
281281
if (IS_ENABLED(CONFIG_LOCKDEP)) { \
282282
WARN_ONCE(!rcu_is_watching(), \

0 commit comments

Comments
 (0)