Skip to content

Commit

Permalink
tracing/events: put TP_fast_assign into braces
Browse files Browse the repository at this point in the history
Currently TP_fast_assign has a limitation that we can't define local
variables in it.

Here's one use case when we introduce __dynamic_array():

TP_fast_assign(
	type *p = __get_dynamic_array(item);

	foo(p);
	bar(p);
),

[ Impact: allow defining local variables in TP_fast_assign ]

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4A2384B1.90100@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Li Zefan authored and Steven Rostedt committed Jun 2, 2009
1 parent 6e25db4 commit a9c1c3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/trace/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ static void ftrace_raw_event_##call(proto) \
return; \
entry = ring_buffer_event_data(event); \
\
assign; \
{ assign; } \
\
if (!filter_current_check_discard(event_call, entry, event)) \
trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \
Expand Down

0 comments on commit a9c1c3a

Please sign in to comment.