From patchwork Thu Oct 5 19:04:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 148996 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2016:b0:403:3b70:6f57 with SMTP id fe22csp508613vqb; Thu, 5 Oct 2023 12:07:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBwNgLPWcXVHtc4P6u+MJPRre5MStx4yENu+/Bd3+zt/fL7/W8LkBzdxb8gsdKkuWwmI+L X-Received: by 2002:a17:90b:46c7:b0:277:4b68:b93c with SMTP id jx7-20020a17090b46c700b002774b68b93cmr6026583pjb.4.1696532823217; Thu, 05 Oct 2023 12:07:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696532823; cv=none; d=google.com; s=arc-20160816; b=yLS2fCT5ebTrK49qB2plk+GjafCwUIuccGXsKXer4xTuAT+tPJ9hwVQLfFFGz6dRmo UV3uV6Aw27tmL6YeiGK4V7/eOgC/+iP/fkVqpynYffrs0zpnNYoKe6N7DmuoCvm3pxTc 3xHfaE1B04nHIQYJGJdc+7TSnLECKi2JfuyyUHa8LHoByGL0HOEN02L4nfrhboOyRNkL 4eGnsFjI1yq74HvGJQAGAR6Ju53itb8RSUJu4TdQ/Dm1rEEBitbBsVQ3Gf9TkZbpDOf8 ATk1IiMqmfG/QQJo+4rauhCQm/gpl0ktqz03D0WYv/op6Mb9njJlqM5cULZEbm1ljYY9 8ZoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=i10KStxUqu3UJXHF4fUURVSFlv1f/TTIt6nKm8fPeCo=; fh=7ueK1huCq2Lf3LMjc8i3Ob70zhQl+8ZRdqYzG6swRYY=; b=ld+Y/uTf2ypYoW1gMhkZzd1hGceQXiVOw1wT7WiQsevEvaUNAgNg8UiUkFUYIlWhkN 23nD2f5KjXjUxL1lDd9dcGrKWmhCl1gyPxuQosima5B5guOnNc1z1mwNbqFCWtUAOtL/ UIUomgW0U4WsZbOVVFLupflapvKdAmm+xuZl4E1dS/vGcy72HwhF6B7o6CqBB9Y7rENo Qx5cgktx1rw5um992QYUV0igEM8RWMOkt+3t0LVRlL2WJDUWcM7VERvFAkvyzu6gwSWr 1eCiEXcDx5N5FSFrixHeWI6GCaa0TlrrKVkH2028LQ2c7nsMhfv3LFVGo21AyXX33sCy mwTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QoDHwYG6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id lp3-20020a17090b4a8300b0026b49c1aa50si4663083pjb.111.2023.10.05.12.07.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 12:07:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QoDHwYG6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4ADF08047075; Thu, 5 Oct 2023 12:06:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230405AbjJETGr (ORCPT + 18 others); Thu, 5 Oct 2023 15:06:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230376AbjJETGh (ORCPT ); Thu, 5 Oct 2023 15:06:37 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6F4ADB; Thu, 5 Oct 2023 12:06:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696532795; x=1728068795; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qtF8zRHNP255BfSQ+DVT/RKn8FRUesePocVsXbPofQc=; b=QoDHwYG6p4azHfsI7MeXDqAdWFsA3Udnh6EirWfssBMDUrb8gibTBdoq 1dEIgG09RlWEhPDSH7L/Hf21lNulqJ1h0wGQ1TlgjOL6xV1lhtmBg81li VRpRQ96KlHavBd0GpFbz+iwQrQOH9nT1GMiQB/HX4l8gxvapibMWqTL4R QgME3JYQ06IWBtpIRAcZZ1v6ADTaPjovX3jIUn47SdximacJzsPdbdbPw 8DBPtj81V6Y7I/3WQCtKhSI18bkyQ1Ux9YC53uja/s0JLNV/LPnpDgf7I GnjKuK65IJ6XKafTqDjzpGvhm81qhI20vwgbDjO5JbYS0fPFpwSNNgCtO Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10854"; a="383488244" X-IronPort-AV: E=Sophos;i="6.03,203,1694761200"; d="scan'208";a="383488244" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2023 12:05:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10854"; a="999055151" X-IronPort-AV: E=Sophos;i="6.03,203,1694761200"; d="scan'208";a="999055151" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.249.35.8]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2023 12:05:14 -0700 From: Adrian Hunter To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Ian Rogers , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH 3/5] perf intel-pt: Use existing definitions of le16_to_cpu() etc Date: Thu, 5 Oct 2023 22:04:49 +0300 Message-Id: <20231005190451.175568-4-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231005190451.175568-1-adrian.hunter@intel.com> References: <20231005190451.175568-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 05 Oct 2023 12:06:59 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778943601910580197 X-GMAIL-MSGID: 1778943601910580197 Use definitions from tools/include/linux/kernel.h Signed-off-by: Adrian Hunter --- tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c index 249610cc9284..ffd0d647473c 100644 --- a/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c +++ b/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "intel-pt-pkt-decoder.h" @@ -17,17 +18,11 @@ #define BIT63 ((uint64_t)1 << 63) #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -#define le16_to_cpu bswap_16 -#define le32_to_cpu bswap_32 -#define le64_to_cpu bswap_64 #define memcpy_le64(d, s, n) do { \ memcpy((d), (s), (n)); \ *(d) = le64_to_cpu(*(d)); \ } while (0) #else -#define le16_to_cpu -#define le32_to_cpu -#define le64_to_cpu #define memcpy_le64 memcpy #endif