Skip to contentSkip to conversation

ftrace: remove redundant assignment to pointer 'name'

PATCH New Colin King 1 participant 1 message Apr 5, 2020

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 ftrace: remove redundant assignment to pointer 'name'

From: Colin Ian King <[email protected]>

The pointer 'name' is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Replace it with the later assignment.

Addresses-Coverity: ("Unused value")

---
 kernel/trace/trace.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
kernel/trace/trace.c +1 -3
index 6519b7afc499..7f763edc7195 100644
@@ -3783,9 +3783,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);
 
Signature · 1 line
2.25.1