]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
tracing: add comment for use of double __builtin_consant_p
authorSteven Rostedt <srostedt@redhat.com>
Fri, 13 Mar 2009 04:12:52 +0000 (00:12 -0400)
committerSteven Rostedt <srostedt@redhat.com>
Fri, 13 Mar 2009 04:15:46 +0000 (00:15 -0400)
Impact: documentation

The use of the double __builtin_contant_p checks in the event_trace_printk
can be confusing to developers and reviewers. This patch adds a comment
to explain why it is there.

Requested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
LKML-Reference: <20090313122235.43EB.A69D9226@jp.fujitsu.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
kernel/trace/trace.h

index 35cfa7bbaf38435da4de9e4c9382fd3237c04a94..67595b8f0f157d1c684e66425ec3eebe604756c4 100644 (file)
@@ -776,6 +776,11 @@ extern struct ftrace_event_call __stop_ftrace_events[];
 extern const char *__start___trace_bprintk_fmt[];
 extern const char *__stop___trace_bprintk_fmt[];
 
+/*
+ * The double __builtin_constant_p is because gcc will give us an error
+ * if we try to allocate the static variable to fmt if it is not a
+ * constant. Even with the outer if statement optimizing out.
+ */
 #define event_trace_printk(ip, fmt, args...)                           \
 do {                                                                   \
        __trace_printk_check_format(fmt, ##args);                       \