History

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

sunliming committed 4 years ago

Commit f4b0d311 parent cc72b721 file · +0 −2Browse files

Unified · Split

kernel/trace/trace.c+0−2
@@ -6424,9 +6424,7 @@ int tracing_set_tracer(struct trace_array *tr, const char *buf) · 6423 unmodified lines
64246424 synchronize_rcu();
64256425 free_snapshot(tr);
64266426 }
6427−#endif
64286427
6429−#ifdef CONFIG_TRACER_MAX_TRACE
64306428 if (t->use_max_tr && !had_max_tr) {
64316429 ret = tracing_alloc_snapshot_instance(tr);
64326430 if (ret < 0)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t