From: Steven Rostedt <rostedt@goodmis.org>
To: Nikita Kiryushin <kiryushin@ancud.ru>
Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>,
lvc-project@linuxtesting.org, linux-trace-kernel@vger.kernel.org,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [lvc-project] [PATCH] tracing: remove unreachable trace_array_put
Date: Tue, 16 Jul 2024 15:34:32 -0400 [thread overview]
Message-ID: <20240716153432.4024a180@rorschach.local.home> (raw)
In-Reply-To: <38513f97-d99a-4758-b84e-278e30f5565c@ancud.ru>
On Tue, 16 Jul 2024 22:19:05 +0300
Nikita Kiryushin <kiryushin@ancud.ru> wrote:
> On 7/16/24 12:45, Alexey Khoroshilov wrote:
> > Yes, but there is another possible modification: replacement of call to
> > nonseekable_open() by a call to some other function that returns error.
> > Current code is already ready for such modification.
>
> The change of which function is called would change the behavior indeed, but,
> TBH, I do not see it as a valid point: If we assume that nonseekable_open() changes to something else in the future, we may assume as well that some other call will be
> added later with a risk of resource leaking. This is a thing, that whoever would do
> such changes should be careful about.
>
> For me, the code as it is now, is not uniform with the other places that use
> nonseekable_open().
The point is moot. If something returns a value, even if it says it
will never return failure, there's no harm in checking it. If we ignore
the return value, that is a unneeded coupling of design between the
function and its users.
It does no harm in checking the value, so I rather just keep doing so.
-- Steve
prev parent reply other threads:[~2024-07-16 19:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-12 20:12 Nikita Kiryushin
2024-07-12 23:33 ` Steven Rostedt
2024-07-15 13:47 ` Nikita Kiryushin
2024-07-16 9:45 ` [lvc-project] " Alexey Khoroshilov
2024-07-16 19:19 ` Nikita Kiryushin
2024-07-16 19:34 ` 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=20240716153432.4024a180@rorschach.local.home \
--to=rostedt@goodmis.org \
--cc=khoroshilov@ispras.ru \
--cc=kiryushin@ancud.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
/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®