signals: move trace header #include to after all others.
PATCH 1/1 signals: move trace header #include to after all others.
Steven Rostedt says:
The trace events headers are suppose to be the last headers included.
and this fixes a build error when another header already includes trace stuff, which I saw when adding a highmem.h include to skbuff.h e.g.:
In file included from include/trace/ftrace.h:296:0,
from include/trace/define_trace.h:96,
from include/trace/events/irq.h:150,
from include/linux/interrupt.h:23,
from arch/x86/include/asm/highmem.h:23,
from include/linux/highmem.h:33,
from include/linux/skbuff.h:32,
from kernel/audit.h:24,
from kernel/signal.c:38:include/trace/events/irq.h: In function 'ftrace_raw_output_softirq':include/trace/events/irq.h:87:1: error: 'HI_SOFTIRQ' undeclared (first use in this function) include/trace/events/irq.h:87:1: note: each undeclared identifier is reported only once for each function it appears in include/trace/events/irq.h:87:1: error: 'TIMER_SOFTIRQ' undeclared (first use in this function) include/trace/events/irq.h:87:1: error: 'NET_TX_SOFTIRQ' undeclared (first use in this function) include/trace/events/irq.h:87:1: error: 'NET_RX_SOFTIRQ' undeclared (first use in this function) include/trace/events/irq.h:87:1: error: 'BLOCK_SOFTIRQ' undeclared (first use in this function) include/trace/events/irq.h:87:1: error: 'BLOCK_IOPOLL_SOFTIRQ' undeclared (first use in this function) include/trace/events/irq.h:87:1: error: 'TASKLET_SOFTIRQ' undeclared (first use in this function) include/trace/events/irq.h:87:1: error: 'SCHED_SOFTIRQ' undeclared (first use in this function) include/trace/events/irq.h:87:1: error: 'HRTIMER_SOFTIRQ' undeclared (first use in this function) include/trace/events/irq.h:87:1: error: 'RCU_SOFTIRQ' undeclared (first use in this function)
See http://lkml.kernel.org/r/[email protected]
--- kernel/signal.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
kernel/signal.c +3 -2
@@ -28,8 +28,6 @@#include <linux/freezer.h> #include <linux/pid_namespace.h> #include <linux/nsproxy.h> -#define CREATE_TRACE_POINTS -#include <trace/events/signal.h> #include <asm/param.h> #include <asm/uaccess.h>
@@ -37,6 +35,9 @@#include <asm/siginfo.h> #include "audit.h" /* audit_signal_info() */ +#define CREATE_TRACE_POINTS +#include <trace/events/signal.h> +/* * SLAB caches for signal bits. */
Signature · 1 line
1.7.2.5
Quoted 27 lines · Ian Campbell
Steven Rostedt says:
The trace events headers are suppose to be the last headers included.
and this fixes a build error when another header already includes trace stuff, which I saw when adding ahighmem.hinclude toskbuff.he.g.:
In file included frominclude/trace/ftrace.h:296:0,from include/trace/define_trace.h:96, from include/trace/events/irq.h:150, from include/linux/interrupt.h:23, from arch/x86/include/asm/highmem.h:23, from include/linux/highmem.h:33, from include/linux/skbuff.h:32, from kernel/audit.h:24, from kernel/signal.c:38:
include/trace/events/irq.h: In function 'ftrace_raw_output_softirq':include/trace/events/irq.h:87:1: error: 'HI_SOFTIRQ' undeclared (first use in this function)include/trace/events/irq.h:87:1: note: each undeclared identifier is reported only once for each function it appears ininclude/trace/events/irq.h:87:1: error: 'TIMER_SOFTIRQ' undeclared (first use in this function)include/trace/events/irq.h:87:1: error: 'NET_TX_SOFTIRQ' undeclared (first use in this function)include/trace/events/irq.h:87:1: error: 'NET_RX_SOFTIRQ' undeclared (first use in this function)include/trace/events/irq.h:87:1: error: 'BLOCK_SOFTIRQ' undeclared (first use in this function)include/trace/events/irq.h:87:1: error: 'BLOCK_IOPOLL_SOFTIRQ' undeclared (first use in this function)include/trace/events/irq.h:87:1: error: 'TASKLET_SOFTIRQ' undeclared (first use in this function)include/trace/events/irq.h:87:1: error: 'SCHED_SOFTIRQ' undeclared (first use in this function)include/trace/events/irq.h:87:1: error: 'HRTIMER_SOFTIRQ' undeclared (first use in this function)include/trace/events/irq.h:87:1: error: 'RCU_SOFTIRQ' undeclared (first use in this function)
Quoted 7 lines
See http://lkml.kernel.org/r/[email protected]
Signed-off-by Ian Campbell <[email protected]>Cc Tejun Heo <[email protected]>Cc Oleg Nesterov <[email protected]>Cc Frederic Weisbecker <[email protected]>Cc Ingo Molnar <[email protected]>
-- Steve
Quoted 27 lines
--- kernel/signal.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)kernel/signal.c +3
-2@@ -28,8 +28,6 @@#include <linux/freezer.h> #include <linux/pid_namespace.h> #include <linux/nsproxy.h> -#define CREATE_TRACE_POINTS -#include <trace/events/signal.h> #include <asm/param.h> #include <asm/uaccess.h> @@ -37,6 +35,9 @@#include <asm/siginfo.h> #include "audit.h" /* audit_signal_info() */ +#define CREATE_TRACE_POINTS +#include <trace/events/signal.h> +/* * SLAB caches for signal bits. */