Re: [PATCH v8 19/21] tracing/remotes: Add trace_remote cmdline options

From
sashiko-bot@kernel.org
Date
2026-11-06 18:33:58
Reply to
Vincent Donnefort, 2026-11-06
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] tracing/remotes: split __free() declaration in
  trace_remote_apply_cmdline()
--

commit 3674f78ef7ea9a2c747f5fd09bdd3df0f8cecb63
Author: Vincent Donnefort [off-list ref]

tracing/remotes: Add trace_remote cmdline options

This commit adds the trace_remote= kernel command-line option to configure
trace remote options and enable events upon registration.
quoted hunk ↗ jump to hunk
diff --git a/kernel/trace/trace_remote.c b/kernel/trace/trace_remote.c
index ebfc2dd67b79c..9fa8d38caa3b8 100644
--- a/kernel/trace/trace_remote.c
+++ b/kernel/trace/trace_remote.c
[ ... ]
quoted hunk ↗ jump to hunk
+static void trace_remote_apply_cmdline(const char *name, struct trace_remote *remote)
+{
+	char *cmdline __free(kfree) = NULL;
+	char *events_cmdline = NULL;
+	char *opts_cmdline = NULL;
+	bool tracing_on = false;
+	bool dmesg_on = false;
+	char *curr, *next;
+	int ret;
+
+	if (!trace_remote_cmdline[0])
+		return;
+
+	cmdline = kstrdup(trace_remote_cmdline, GFP_KERNEL);
[Severity: Low]
This isn't a bug, but per the cleanup.h convention, __free() variables
should be defined and initialized in a single statement after the
!trace_remote_cmdline[0] check rather than declared as = NULL at the top
of the function and assigned later.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261106180657.2460376-1-vdonnefort@google.com?part=19
Thread (27 messages) 27 messages, 2 authors, last reply 5d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help