tracing: Cleanup code by removing init "char *name"
authorliqiong <liqiong@nfschina.com>
Fri, 13 May 2022 07:52:21 +0000 (15:52 +0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 27 May 2022 01:13:00 +0000 (21:13 -0400)
The pointer is assigned to "type->name" anyway. no need to
initialize with "preemption".

Link: https://lkml.kernel.org/r/20220513075221.26275-1-liqiong@nfschina.com
Signed-off-by: liqiong <liqiong@nfschina.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace.c

index e38a7ca..f400800 100644 (file)
@@ -4276,9 +4276,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);