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
Unified · Split
| @@ -6424,9 +6424,7 @@ int tracing_set_tracer(struct trace_array *tr, const char *buf) · 6423 unmodified lines | |||
| 6424 | synchronize_rcu(); | 6424 | synchronize_rcu(); |
| 6425 | free_snapshot(tr); | 6425 | free_snapshot(tr); |
| 6426 | } | 6426 | } |
| 6427 | #endif | ||
| 6428 | 6427 | ||
| 6429 | #ifdef CONFIG_TRACER_MAX_TRACE | ||
| 6430 | if (t->use_max_tr && !had_max_tr) { | 6428 | if (t->use_max_tr && !had_max_tr) { |
| 6431 | ret = tracing_alloc_snapshot_instance(tr); | 6429 | ret = tracing_alloc_snapshot_instance(tr); |
| 6432 | if (ret < 0) | 6430 | if (ret < 0) |