diff options
author | sunliming <sunliming@kylinos.cn> | 2022-06-02 16:06:13 +0200 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2022-06-18 00:42:17 +0200 |
commit | f4b0d318097e45cbac5e14976f8bb56aa2cef504 (patch) | |
tree | 6d760c482cb132c2f76c0511506a8fde07921a3f | |
parent | tracing/kprobes: Check whether get_kretprobe() returns NULL in kretprobe_disp... (diff) | |
download | linux-f4b0d318097e45cbac5e14976f8bb56aa2cef504.tar.xz linux-f4b0d318097e45cbac5e14976f8bb56aa2cef504.zip |
tracing: Simplify conditional compilation code in tracing_set_tracer()
Two conditional compilation directives "#ifdef CONFIG_TRACER_MAX_TRACE"
are used consecutively, and no other code in between. Simplify conditional
the compilation code and only use one "#ifdef CONFIG_TRACER_MAX_TRACE".
Link: https://lkml.kernel.org/r/20220602140613.545069-1-sunliming@kylinos.cn
Signed-off-by: sunliming <sunliming@kylinos.cn>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-rw-r--r-- | kernel/trace/trace.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 2c95992e2c71..a8cfac0611bc 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -6424,9 +6424,7 @@ int tracing_set_tracer(struct trace_array *tr, const char *buf) synchronize_rcu(); free_snapshot(tr); } -#endif -#ifdef CONFIG_TRACER_MAX_TRACE if (t->use_max_tr && !had_max_tr) { ret = tracing_alloc_snapshot_instance(tr); if (ret < 0) |