remoteproc: core: Set trace buffer name for diagnostics

rproc_trace_read() (in remoteproc_debugfs.c) prints the name of a
trace buffer whose device address could not be resolved, but nothing
ever assigns trace_mem.name, so that the diagnostics always prints
an empty string:

	Trace  not available

Copy the generated "trace%d" name into the memory entry, so the
diagnostics identifies the buffer failed to translate.

Fixes: a987e6b91a ("remoteproc: fix trace buffer va initialization")
Assisted-by: Claude-Code:glm-5.3
Signed-off-by: Yonghao Zhang <hyz3367@gmail.com>
Link: https://lore.kernel.org/r/20260911081810.740028-1-hyz3367@gmail.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
This commit is contained in:
Yonghao Zhang 2026-09-11 16:18:10 +08:00 committed by Mathieu Poirier
parent a020648a79
commit e23eab619b

View File

@ -574,6 +574,9 @@ static int rproc_handle_trace(struct rproc *rproc, void *ptr,
/* create the debugfs entry */
trace->tfile = rproc_create_trace_file(name, rproc, trace);
/* keep the name for the diagnostic in rproc_trace_read() */
strscpy(trace->trace_mem.name, name, sizeof(trace->trace_mem.name));
list_add_tail(&trace->node, &rproc->traces);
rproc->num_traces++;