From: liqiong <liqiong@nfschina.com>
To: Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org, hukun@nfschina.com,
qixu@nfschina.com, yuzhe@nfschina.com, renyu@nfschina.com,
liqiong <liqiong@nfschina.com>
Subject: [PATCH] kernel/trace: cleanup code, remove init "char *name"
Date: Fri, 13 May 2022 15:52:21 +0800 [thread overview]
Message-ID: <20220513075221.26275-1-liqiong@nfschina.com> (raw)
The pointer is assigned to "type->name" anyway. no need to
initialize with "preemption".
Signed-off-by: liqiong <liqiong@nfschina.com>
---
kernel/trace/trace.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 64649990a66a..d511581cfafd 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4273,9 +4273,7 @@ print_trace_header(struct seq_file *m, struct trace_iterator *iter)
struct tracer *type = iter->trace;
unsigned long entries;
unsigned long total;
- const char *name = "preemption";
-
- name = type->name;
+ const char *name = type->name;
get_total_entries(buf, &total, &entries);
--
2.25.1
reply other threads:[~2022-05-13 7:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220513075221.26275-1-liqiong@nfschina.com \
--to=liqiong@nfschina.com \
--cc=hukun@nfschina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=qixu@nfschina.com \
--cc=renyu@nfschina.com \
--cc=rostedt@goodmis.org \
--cc=yuzhe@nfschina.com \
/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;
as well as URLs for NNTP newsgroup(s).