aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-13 00:12:52 -0400
committerSteven Rostedt <srostedt@redhat.com>2009-03-13 00:15:46 -0400
commitbdc067582b8b71c7771bab076bbc51569c594fb4 (patch)
treea202353e4e365ae29c5bf95ca33eacd8eb4dfb54 /kernel
parenteb1871f34358024acfa3523ef375ef14b7527173 (diff)
tracing: add comment for use of double __builtin_consant_p
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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 35cfa7bbaf38..67595b8f0f15 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -776,6 +776,11 @@ extern struct ftrace_event_call __stop_ftrace_events[];
776extern const char *__start___trace_bprintk_fmt[]; 776extern const char *__start___trace_bprintk_fmt[];
777extern const char *__stop___trace_bprintk_fmt[]; 777extern const char *__stop___trace_bprintk_fmt[];
778 778
779/*
780 * The double __builtin_constant_p is because gcc will give us an error
781 * if we try to allocate the static variable to fmt if it is not a
782 * constant. Even with the outer if statement optimizing out.
783 */
779#define event_trace_printk(ip, fmt, args...) \ 784#define event_trace_printk(ip, fmt, args...) \
780do { \ 785do { \
781 __trace_printk_check_format(fmt, ##args); \ 786 __trace_printk_check_format(fmt, ##args); \