public inbox for linux-trace-devel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wenjun Huo <huowenjun.dev@gmail.com>
To: linux-trace-devel@vger.kernel.org
Cc: rostedt@goodmis.org, Wenjun Huo <huowenjun.dev@gmail.com>
Subject: [PATCH 1/1] trace-cmd: remove obsolete tep_set_local_bigendian() call
Date: Sat, 27 Dec 2025 22:09:10 +0800	[thread overview]
Message-ID: <20251227140910.2024-1-huowenjun.dev@gmail.com> (raw)

The tep_set_local_bigendian() call in tracecmd_alloc_fd() is obsolete
because tep_alloc() already initializes the host endianness. This was
a legacy from commit cd001f7b40f9d ("Add handler to pevent functions")
when pevent_alloc() did not initialize host_bigendian.

The removal has been functionally tested by recording a trace on an
x86 (little-endian) host and successfully reporting it on an s390x
(big-endian) virtual machine, confirming endianness conversion works
correctly without this line.

Signed-off-by: Wenjun Huo <huowenjun.dev@gmail.com>
---
 lib/trace-cmd/trace-input.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c
index f2471c92..95a8de53 100644
--- a/lib/trace-cmd/trace-input.c
+++ b/lib/trace-cmd/trace-input.c
@@ -4942,7 +4942,6 @@ struct tracecmd_input *tracecmd_alloc_fd(int fd, int flags)
 	handle->plugin_list = tcmd_load_plugins(handle->pevent, flags);
 
 	tep_set_file_bigendian(handle->pevent, buf[0]);
-	tep_set_local_bigendian(handle->pevent, tracecmd_host_bigendian());
 
 	do_read_check(handle, buf, 1);
 	handle->long_size = buf[0];
-- 
2.43.0


                 reply	other threads:[~2025-12-27 14:09 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=20251227140910.2024-1-huowenjun.dev@gmail.com \
    --to=huowenjun.dev@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.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