History

tracing: Fix anonymous unions in struct ftrace_event_call

gcc <= 4.5.x has significant limitations with respect to initialization of anonymous unions within structures. They need to be surrounded by brackets, _and_ they need to be initialized in the same order in which they appear in the structure declaration. Link: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 Link: http://lkml.kernel.org/r/1397077568-3156-1-git-send-email-mathieu.desnoyers@efficios.com

Mathieu Desnoyers committed 12 years ago

Commit abb43f61 parent b725dfe3 files · +19 −7Browse files

Showing the changes to include/trace (1 of 3 files). Show all

Unified · Split

include/trace/ftrace.h+9−3
@@ -470,8 +470,10 @@ static inline notrace int ftrace_get_offsets_##call( \ · 469 unmodified lines
470470 * };
471471 *
472472 * static struct ftrace_event_call event_<call> = {
473− * .tp = &__tracepoint_<call>,
474473 * .class = event_class_<template>,
474+ * {
475+ * .tp = &__tracepoint_<call>,
476+ * },
475477 * .event = &ftrace_event_type_<call>,
476478 * .print_fmt = print_fmt_<call>,
477479 * .flags = TRACE_EVENT_FL_TRACEPOINT,
@@ -606,8 +608,10 @@ static struct ftrace_event_class __used __refdata event_class_##call = { \ · 128 unmodified lines
606608 #define DEFINE_EVENT(template, call, proto, args) \
607609 \
608610 static struct ftrace_event_call __used event_##call = { \
609− .tp = &__tracepoint_##call, \
610611 .class = &event_class_##template, \
612+ { \
613+ .tp = &__tracepoint_##call, \
614+ }, \
611615 .event.funcs = &ftrace_event_type_funcs_##template, \
612616 .print_fmt = print_fmt_##template, \
613617 .flags = TRACE_EVENT_FL_TRACEPOINT, \
@@ -621,8 +625,10 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call · 7 unmodified lines
621625 static const char print_fmt_##call[] = print; \
622626 \
623627 static struct ftrace_event_call __used event_##call = { \
624− .tp = &__tracepoint_##call, \
625628 .class = &event_class_##template, \
629+ { \
630+ .tp = &__tracepoint_##call, \
631+ }, \
626632 .event.funcs = &ftrace_event_type_funcs_##call, \
627633 .print_fmt = print_fmt_##call, \
628634 .flags = TRACE_EVENT_FL_TRACEPOINT, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t