Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / kernel / trace / trace_export.c
index 31da218ee10f317e6076eaa016e2b28eff599027..dff8c84ddf17589543ca90e71af630cf7b0755b7 100644 (file)
 struct ____ftrace_##name {                                     \
        tstruct                                                 \
 };                                                             \
-static void __used ____ftrace_check_##name(void)               \
+static void __always_unused ____ftrace_check_##name(void)      \
 {                                                              \
        struct ____ftrace_##name *__entry = NULL;               \
                                                                \
-       /* force cmpile-time check on F_printk() */             \
+       /* force compile-time check on F_printk() */            \
        printk(print);                                          \
 }
 
@@ -134,7 +134,6 @@ ftrace_format_##name(struct ftrace_event_call *unused,                      \
 
 #include "trace_entries.h"
 
-
 #undef __field
 #define __field(type, item)                                            \
        ret = trace_define_field(event_call, #type, #item,              \
@@ -196,6 +195,11 @@ ftrace_define_fields_##name(struct ftrace_event_call *event_call)  \
 
 #include "trace_entries.h"
 
+static int ftrace_raw_init_event(struct ftrace_event_call *call)
+{
+       INIT_LIST_HEAD(&call->fields);
+       return 0;
+}
 
 #undef __field
 #define __field(type, item)
@@ -214,7 +218,6 @@ ftrace_define_fields_##name(struct ftrace_event_call *event_call)   \
 
 #undef FTRACE_ENTRY
 #define FTRACE_ENTRY(call, struct_name, type, tstruct, print)          \
-static int ftrace_raw_init_event_##call(void);                         \
                                                                        \
 struct ftrace_event_call __used                                                \
 __attribute__((__aligned__(4)))                                                \
@@ -222,14 +225,9 @@ __attribute__((section("_ftrace_events"))) event_##call = {                \
        .name                   = #call,                                \
        .id                     = type,                                 \
        .system                 = __stringify(TRACE_SYSTEM),            \
-       .raw_init               = ftrace_raw_init_event_##call,         \
+       .raw_init               = ftrace_raw_init_event,                \
        .show_format            = ftrace_format_##call,                 \
        .define_fields          = ftrace_define_fields_##call,          \
 };                                                                     \
-static int ftrace_raw_init_event_##call(void)                          \
-{                                                                      \
-       INIT_LIST_HEAD(&event_##call.fields);                           \
-       return 0;                                                       \
-}                                                                      \
 
 #include "trace_entries.h"