From: Steven Rostedt <rostedt@goodmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: "Baek Kyu, Kim" <pocj8ur4in@gmail.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: Free tracer resources on instance creation failure
Date: Mon, 26 Oct 2026 13:12:02 -0400 [thread overview]
Message-ID: <20261026131202.7cfd189e@gandalf.local.home> (raw)
In-Reply-To: <undine-1792979620229535425-240da28948f7e6f5@undined.local>
On Mon, 26 Oct 2026 10:53:40 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> > + out_free_tracers:
> > + free_tracers(tr);
> > + for (int i = 0; i < tr->nr_topts; i++)
> > + kfree(tr->topts[i].topts);
> > + kfree(tr->topts);
>
> Two minor nits:
>
> - Please declare `int i;` at the beginning of trace_array_create_systems()
> rather than inlining it inside `for (int i = 0; ...)`, matching the
> prevailing style in trace.c (e.g. in __remove_instance()).
Actually, it's now OK to do this. It used to not be (which is why the old
code doesn't do it), but I've been slowing moving to this style. And new
code may do so too.
-- Steve
prev parent reply other threads:[~2026-10-26 17:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 16:52 Baek Kyu, Kim
2026-10-26 1:53 ` Masami Hiramatsu
2026-10-26 17:12 ` Steven Rostedt [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=20261026131202.7cfd189e@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=pocj8ur4in@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
all inboxes | Powered by JetHome®