[PATCH] tracing/events: protect __get_str()

From: Frederic Weisbecker
Date: Tue Apr 21 2009 - 18:41:09 EST


The __get_str() macro is used in a code part then its content should be
protected with parenthesis.

[ Impact: protect macro content ]

Reported-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
---
include/trace/ftrace.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 353b7db..019cc5d 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -123,7 +123,7 @@
#define TP_printk(fmt, args...) fmt "\n", args

#undef __get_str
-#define __get_str(field) (char *)__entry + __entry->__str_loc_##field
+#define __get_str(field) ((char *)__entry + __entry->__str_loc_##field)

#undef TRACE_EVENT
#define TRACE_EVENT(call, proto, args, tstruct, assign, print) \
--
1.6.2.3


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/