Skip to content

Commit 6371b4b

Browse files
ColinIanKingrostedt
authored andcommitted
tracing: Remove redundant check on field->field in histograms
The check on field->field being true is handled as the first check on the cascaded if statement, so the later checks on field->field are redundant because this clause has already been handled. Since this later check is redundant, just remove it. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/20241107120530.18728-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent 24507ce commit 6371b4b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

kernel/trace/trace_events_hist.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,10 +1354,7 @@ static const char *hist_field_name(struct hist_field *field,
13541354
} else if (field->flags & HIST_FIELD_FL_TIMESTAMP)
13551355
field_name = "common_timestamp";
13561356
else if (field->flags & HIST_FIELD_FL_STACKTRACE) {
1357-
if (field->field)
1358-
field_name = field->field->name;
1359-
else
1360-
field_name = "common_stacktrace";
1357+
field_name = "common_stacktrace";
13611358
} else if (field->flags & HIST_FIELD_FL_HITCOUNT)
13621359
field_name = "hitcount";
13631360

0 commit comments

Comments
 (0)