Skip to content

Commit 8613a55

Browse files
Liao Yuanhongrostedt
authored andcommitted
tracing: Remove redundant 0 value initialization
The saved_cmdlines_buffer struct is already zeroed by memset(). It's redundant to initialize s->cmdline_idx to 0. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/20250825123200.306272-1-liaoyuanhong@vivo.com Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent ade2105 commit 8613a55

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

kernel/trace/trace_sched_switch.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ static struct saved_cmdlines_buffer *allocate_cmdlines_buffer(unsigned int val)
224224
/* Place map_cmdline_to_pid array right after saved_cmdlines */
225225
s->map_cmdline_to_pid = (unsigned *)&s->saved_cmdlines[val * TASK_COMM_LEN];
226226

227-
s->cmdline_idx = 0;
228227
memset(&s->map_pid_to_cmdline, NO_CMDLINE_MAP,
229228
sizeof(s->map_pid_to_cmdline));
230229
memset(s->map_cmdline_to_pid, NO_CMDLINE_MAP,

0 commit comments

Comments
 (0)