From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37047C43387 for ; Wed, 9 Jan 2019 07:13:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0DF7820821 for ; Wed, 9 Jan 2019 07:13:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729886AbfAIHNh (ORCPT ); Wed, 9 Jan 2019 02:13:37 -0500 Received: from terminus.zytor.com ([198.137.202.136]:59933 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729473AbfAIHNh (ORCPT ); Wed, 9 Jan 2019 02:13:37 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x097DBl13855920 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 8 Jan 2019 23:13:11 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x097DBTa3855917; Tue, 8 Jan 2019 23:13:11 -0800 Date: Tue, 8 Jan 2019 23:13:11 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Tzvetomir Stoyanov Message-ID: Cc: jolsa@redhat.com, mingo@kernel.org, hpa@zytor.com, tglx@linutronix.de, rostedt@goodmis.org, acme@redhat.com, akpm@linux-foundation.org, namhyung@kernel.org, tstoyanov@vmware.com, linux-kernel@vger.kernel.org Reply-To: acme@redhat.com, mingo@kernel.org, jolsa@redhat.com, tglx@linutronix.de, hpa@zytor.com, rostedt@goodmis.org, linux-kernel@vger.kernel.org, namhyung@kernel.org, tstoyanov@vmware.com, akpm@linux-foundation.org In-Reply-To: <20181201040852.216292134@goodmis.org> References: <20181201040852.216292134@goodmis.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] tools lib traceevent: Initialize host_bigendian at tep_handle allocation Git-Commit-ID: eed14f4b075ec594ac09921b998bf3dd61f5886b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: eed14f4b075ec594ac09921b998bf3dd61f5886b Gitweb: https://git.kernel.org/tip/eed14f4b075ec594ac09921b998bf3dd61f5886b Author: Tzvetomir Stoyanov AuthorDate: Fri, 30 Nov 2018 23:08:08 -0500 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 8 Jan 2019 13:28:13 -0300 tools lib traceevent: Initialize host_bigendian at tep_handle allocation 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 Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20181201040852.216292134@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo --- tools/lib/traceevent/event-parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 156e513074b2..44b80471b024 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c @@ -6762,8 +6762,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; }