Skip to content

Commit f00c920

Browse files
mhiramatrostedt
authored andcommitted
tracing: Fix a compilation error without CONFIG_MODULES
There are some code which depends on CONFIG_MODULES. #ifdef to enclose it. Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/174230515367.2909896.8132122175220657625.stgit@mhiramat.tok.corp.google.com Fixes: dca91c1 ("tracing: Have persistent trace instances save module addresses") Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent fb6d032 commit f00c920

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

kernel/trace/trace.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6001,6 +6001,7 @@ struct trace_scratch {
60016001

60026002
static DEFINE_MUTEX(scratch_mutex);
60036003

6004+
#ifdef CONFIG_MODULES
60046005
static int save_mod(struct module *mod, void *data)
60056006
{
60066007
struct trace_array *tr = data;
@@ -6025,6 +6026,12 @@ static int save_mod(struct module *mod, void *data)
60256026

60266027
return 0;
60276028
}
6029+
#else
6030+
static int save_mod(struct module *mod, void *data)
6031+
{
6032+
return 0;
6033+
}
6034+
#endif
60286035

60296036
static void update_last_data(struct trace_array *tr)
60306037
{

0 commit comments

Comments
 (0)