From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
sunliming <sunliming@kylinos.cn>
Subject: [for-linus][PATCH 2/4] tracing: Simplify conditional compilation code in tracing_set_tracer()
Date: Mon, 20 Jun 2022 17:32:00 -0400 [thread overview]
Message-ID: <20220620213222.161743834@goodmis.org> (raw)
In-Reply-To: 20220620213158.468216113@goodmis.org
From: sunliming <sunliming@kylinos.cn>
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>
---
kernel/trace/trace.c | 2 --
1 file changed, 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)
--
2.35.1
next prev parent reply other threads:[~2022-06-20 21:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 21:31 [for-linus][PATCH 0/4] tracing: Fixes for 5.19 Steven Rostedt
2022-06-20 21:31 ` [for-linus][PATCH 1/4] tracing/kprobes: Check whether get_kretprobe() returns NULL in kretprobe_dispatcher() Steven Rostedt
2022-06-20 21:32 ` Steven Rostedt [this message]
2022-06-20 21:32 ` [for-linus][PATCH 3/4] tracefs: Fix syntax errors in comments Steven Rostedt
2022-06-20 21:32 ` [for-linus][PATCH 4/4] tracing/uprobes: Remove unwanted initialization in __trace_uprobe_create() Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220620213222.161743834@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=sunliming@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox