From: Steven Rostedt Date: Tue, 25 May 2010 13:19:35 +0000 (-0700) Subject: tracing: Add __used annotation to event variable X-Git-Tag: v2.6.35-rc1~3^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=49c177461bfbedeccbab22bf3905db2f9da7f1c3;p=platform%2Fkernel%2Flinux-3.10.git tracing: Add __used annotation to event variable The TRACE_EVENT() macros automate creation of trace events. To automate initialization, the set up variables are loaded in a special section that is read on boot up. GCC is not aware that these static variables are used and will complain about them if we do not inform GCC that they are indeed used. One of the declarations of the event element was missing a __used annotation. This patch adds it. Reported-by: Ingo Molnar Signed-off-by: Steven Rostedt --- diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 0152b86..34bead7 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h @@ -68,7 +68,7 @@ #undef DEFINE_EVENT #define DEFINE_EVENT(template, name, proto, args) \ - static struct ftrace_event_call \ + static struct ftrace_event_call __used \ __attribute__((__aligned__(4))) event_##name #undef DEFINE_EVENT_PRINT