From: Steven Rostedt <rostedt@goodmis.org>
To: Tomas Glozar <tglozar@redhat.com>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>,
bpf <bpf@vger.kernel.org>, Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
KP Singh <kpsingh@kernel.org>
Subject: Re: [PATCH] btf: Simplify BTF logic with use of __free(btf_put)
Date: Fri, 1 Aug 2025 11:56:49 -0400 [thread overview]
Message-ID: <20250801115649.0b31f582@gandalf.local.home> (raw)
In-Reply-To: <CAP4=nvSNeviiHg89L3dB9pGzi4Obf_s=bWJ8v89Q-fsJbuqymQ@mail.gmail.com>
On Fri, 1 Aug 2025 17:34:51 +0200
Tomas Glozar <tglozar@redhat.com> wrote:
> pá 1. 8. 2025 v 17:29 odesílatel Alexei Starovoitov
> <alexei.starovoitov@gmail.com> napsal:
> >
> > but __free() is imo garbage. It's essence of what's wrong with C++
> >
>
> Here, you at least can read the beginning of the function though, and
> see that a free will be done at the end, like Go's defer, right?
I don't know Go, but I'll assume "yes".
I prefer the __free() over goto end; where you need to free up a temporary
variable on error paths.
But regardless. This will just be a difference of opinion, and I respect
that Alexei doesn't want to use it in his code.
-- Steve
next prev parent reply other threads:[~2025-08-01 15:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-01 11:16 [PATCH] btf: Simplify BTF logic with use of __free(btf_put) Steven Rostedt
2025-08-01 15:02 ` Alexei Starovoitov
2025-08-01 15:07 ` Steven Rostedt
2025-08-01 15:12 ` Alexei Starovoitov
2025-08-01 15:19 ` Steven Rostedt
2025-08-01 15:28 ` Alexei Starovoitov
2025-08-01 15:34 ` Tomas Glozar
2025-08-01 15:56 ` Steven Rostedt [this message]
2025-08-01 15:59 ` Tomas Glozar
2025-08-04 13:26 ` Masami Hiramatsu
2025-08-04 14:20 ` Steven Rostedt
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=20250801115649.0b31f582@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=song@kernel.org \
--cc=tglozar@redhat.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;
as well as URLs for NNTP newsgroup(s).