From: Markus Elfring <Markus.Elfring@web.de>
To: Woradorn Laodhanadhaworn <woradorn.laon@gmail.com>,
linux-trace-kernel@vger.kernel.org,
linux-hardening@vger.kernel.org,
linux-kernel-mentees@lists.linux.dev,
Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Brigham Campbell <me@brighamcampbell.com>,
Jori Koolstra <jkoolstra@xs4all.nl>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Shuah Khan <shuah@kernel.org>,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v3] tracing: Use seq_buf for string concatenation
Date: Wed, 24 Jun 2026 09:15:22 +0200 [thread overview]
Message-ID: <53c33d57-6619-41ba-8963-604337ae35db@web.de> (raw)
In-Reply-To: <20260623145147.12145-1-woradorn.laon@gmail.com>
…
> +++ b/kernel/trace/trace_events.c
…
> @@ -4501,13 +4502,20 @@ extern struct trace_event_call *__start_ftrace_events[];
…
> static __init int setup_trace_event(char *str)
> {
> - if (bootup_event_buf[0] != '\0')
> - strlcat(bootup_event_buf, ",", COMMAND_LINE_SIZE);
> + if (seq_buf_used(&bootup_event_seq) > 0)
> + seq_buf_puts(&bootup_event_seq, ",");
…
I suggest to use the function “seq_buf_putc” instead at this source code place.
https://elixir.bootlin.com/linux/v7.1.1/source/lib/seq_buf.c#L203-L221
Is there a need for corresponding error detection?
Regards,
Markus
prev parent reply other threads:[~2026-06-24 7:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 14:51 [PATCH v3] tracing: Use seq_buf for string concatenation Woradorn Laodhanadhaworn
2026-06-24 5:03 ` Masami Hiramatsu
2026-06-24 7:15 ` Markus Elfring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53c33d57-6619-41ba-8963-604337ae35db@web.de \
--to=markus.elfring@web.de \
--cc=jkoolstra@xs4all.nl \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=me@brighamcampbell.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=woradorn.laon@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox