diff mbox series

[1/6] trace-cmd: Initialize host_bigendian at tep_handle allocation

Message ID 20190130104425.8813-2-tstoyanov@vmware.com (mailing list archive)
State Accepted
Commit e523b2b7d5a0ada0436b371f7807f647bdd45fbd
Headers show
Series Few patches, backported from Arnaldo's kernel repo | expand

Commit Message

Tzvetomir Stoyanov Jan. 30, 2019, 10:44 a.m. UTC
This patch initializes the host_bigendian member of the tep_handle
structure with the byte order of the current host, when this handler is
created - in tep_alloc() API. We need this in order to remove the
tep_set_host_bigendian() API.

Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20181201040852.216292134@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 lib/traceevent/event-parse.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/traceevent/event-parse.c b/lib/traceevent/event-parse.c
index 3f85b94..b506dc7 100644
--- a/lib/traceevent/event-parse.c
+++ b/lib/traceevent/event-parse.c
@@ -6829,8 +6829,10 @@  struct tep_handle *tep_alloc(void)
 {
 	struct tep_handle *pevent = calloc(1, sizeof(*pevent));
 
-	if (pevent)
+	if (pevent) {
 		pevent->ref_count = 1;
+		pevent->host_bigendian = tep_host_bigendian();
+	}
 
 	return pevent;
 }