Skip to content

Commit

Permalink
tracing: have TRACE_EVENT macro use __flags to not shadow parameter
Browse files Browse the repository at this point in the history
The generated functions of TRACE_EVENT uses "flags" in one of the
sub macros which shadows a parameter in the outside macro.

Simple fix is to make the submacro use __flags instead.

Discovered by sparse.

Reported-by: Jaswinder Singh Rajput <jaswinder@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Sep 14, 2009
1 parent ec827c7 commit a48f494
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/trace/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ ftrace_format_##call(struct ftrace_event_call *unused, \
#undef __print_flags
#define __print_flags(flag, delim, flag_array...) \
({ \
static const struct trace_print_flags flags[] = \
static const struct trace_print_flags __flags[] = \
{ flag_array, { -1, NULL }}; \
ftrace_print_flags_seq(p, delim, flag, flags); \
ftrace_print_flags_seq(p, delim, flag, __flags); \
})

#undef __print_symbolic
Expand Down

0 comments on commit a48f494

Please sign in to comment.