From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: [PATCH] libtracefs: Remove unused variable mode in tracefs_cpu_alloc_fd()
Date: Sun, 8 Nov 2026 05:18:31 -0500 [thread overview]
Message-ID: <20261108051831.5c59c6ba@fedora> (raw)
From: Steven Rostedt <rostedt@goodmis.org>
When tracefs_cpu_alloc_fd() was introduced, it broke up
-tracefs_cpu_open() to use parts in multiple functions. As
tracefs_cpu_alloc_fd() was created from -tracefs_cpu_open(), it had the
mode variable from that function, but it never used it.
Remove the unuesd mode variable.
Fixes: da88fcef46b46 ("libtracefs: Add tracefs_cpu_alloc_fd() and tracefs_cpu_free_fd()")
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
src/tracefs-record.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/tracefs-record.c b/src/tracefs-record.c
index f5197c458c07..644082b6ba0e 100644
--- a/src/tracefs-record.c
+++ b/src/tracefs-record.c
@@ -54,17 +54,14 @@ struct tracefs_cpu *
tracefs_cpu_alloc_fd(int fd, int subbuf_size, bool nonblock)
{
struct tracefs_cpu *tcpu;
- int mode = O_RDONLY;
int ret;
tcpu = calloc(1, sizeof(*tcpu));
if (!tcpu)
return NULL;
- if (nonblock) {
- mode |= O_NONBLOCK;
+ if (nonblock)
tcpu->flags |= TC_NONBLOCK | TC_PERM_NONBLOCK;
- }
tcpu->splice_pipe[0] = -1;
tcpu->splice_pipe[1] = -1;
--
2.53.0
reply other threads:[~2026-11-08 10:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261108051831.5c59c6ba@fedora \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.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