public inbox for linux-trace-devel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] trace-cmd: remove obsolete tep_set_local_bigendian() call
@ 2025-12-27 14:09 Wenjun Huo
  0 siblings, 0 replies; only message in thread
From: Wenjun Huo @ 2025-12-27 14:09 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: rostedt, Wenjun Huo

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-12-27 14:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-27 14:09 [PATCH 1/1] trace-cmd: remove obsolete tep_set_local_bigendian() call Wenjun Huo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox