Commit f00c9201 authored by Masami Hiramatsu (Google)'s avatar Masami Hiramatsu (Google) Committed by Steven Rostedt (Google)
Browse files

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: dca91c1c5468 ("tracing: Have persistent trace instances save module addresses")
Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
parent fb6d0323
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -6001,6 +6001,7 @@ struct trace_scratch {

static DEFINE_MUTEX(scratch_mutex);

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

	return 0;
}
#else
static int save_mod(struct module *mod, void *data)
{
	return 0;
}
#endif

static void update_last_data(struct trace_array *tr)
{