mirror of
https://github.com/torvalds/linux.git
synced 2025-04-12 16:47:42 +00:00
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: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
parent
fb6d03238e
commit
f00c9201f9
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user