[PATCH 1/1] trace-cmd: remove obsolete tep_set_local_bigendian() call

Wenjun Huo <[email protected]> Sat, 27 Dec 2025 22:09:10 +0800
Newsgroups org.kernel.vger.linux-trace-devel
Message-ID <[email protected]>
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 <[email protected]>
---
 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