Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp403432ybc; Tue, 12 Nov 2019 03:20:30 -0800 (PST) X-Google-Smtp-Source: APXvYqwo5S42D3Kfwm+QAP+5GBGAKXOD7pRRPsnw52DSjWiQr+n59rIcN0MWLDCWFTSEPfacNzCT X-Received: by 2002:a17:906:e88:: with SMTP id p8mr27362205ejf.15.1573557630490; Tue, 12 Nov 2019 03:20:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573557630; cv=none; d=google.com; s=arc-20160816; b=eZHN1Tj80OK0r6xi2lkgpffKy0DN117zRnQGXP/TvYKF6f+uG102WQuNW5Avrl3gQO bJ0uCIXex09I8jm9uXfoFcshvSeuy6495zm8cZcWpAYg0T9xanKwj3Xe4MRg9XlB7hAu jems6zVX5Ck6EjUnXSIHa4wAQTu9SkD1m5DjEs3+8rU3SUlSI1g6yXAWox+7vRNTHycD JBSo2GX6g+PnAHaUwGf7rF2+g6bMbm0mXtU5ShYhsTqfhG1r1bkug++mjHFDKw8eLQjP XKL2HsU5YFr+8i1UStZJhvdvFl9TnFWYCeXem0v2K8K2plfWYWg7wySQ4iZRPCc7j094 Kf4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=xnMVnFvFK9SfKKckdykXLihoQonnx99O6ytGbLeN3Hk=; b=b4EWQKAW4UUJ4LyDnf5Xmp2BOX6frlnkUlkh9AHlgXwK+kPQJ9n+mvSevnyQFoHyaR 8zlF5sKpU7/dmTWZEFr0J0hp8n8dbbCcM6YtKooLlB/kBX9j6pVXa9sJp56qMAxSMm6E K8J0b7zsmFR/e3uP3h3NKPJIjT1lepC4wsZvRPRk/4Pa4Pcc6evgx91SgRiVB9KYnwlA JWaKSGR29N15CSu4eHR7X8Bs3QG6mtP52QPD3k7hE0iolPLZew4RcoU2CKzJAewyleC4 CTLefZISuwRlqUDDt1CSn0pqMdwayV3JSN6urvHwvU7MNsVySj5QfXPr31JUNw16OWfY gsTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si11142738ejf.351.2019.11.12.03.20.06; Tue, 12 Nov 2019 03:20:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727695AbfKLLS5 (ORCPT + 99 others); Tue, 12 Nov 2019 06:18:57 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:34083 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727603AbfKLLSi (ORCPT ); Tue, 12 Nov 2019 06:18:38 -0500 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iUUBo-0000jr-5o; Tue, 12 Nov 2019 12:18:28 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id AEEC91C0671; Tue, 12 Nov 2019 12:18:16 +0100 (CET) Date: Tue, 12 Nov 2019 11:18:16 -0000 From: "tip-bot2 for Leo Yan" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf cs-etm: Fix definition of macro TO_CS_QUEUE_NR Cc: Leo Yan , Mathieu Poirier , Alexander Shishkin , Jiri Olsa , Mark Rutland , Namhyung Kim , Peter Zijlstra , Suzuki Poulouse , coresight ml , linux-arm-kernel@lists.infradead.org, Arnaldo Carvalho de Melo , Ingo Molnar , Borislav Petkov , linux-kernel@vger.kernel.org In-Reply-To: <20191021074808.25795-1-leo.yan@linaro.org> References: <20191021074808.25795-1-leo.yan@linaro.org> MIME-Version: 1.0 Message-ID: <157355749635.29376.4231346498217230940.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the perf/core branch of tip: Commit-ID: 9d604aad4bb022e848dec80d6fe5f73fe87061a2 Gitweb: https://git.kernel.org/tip/9d604aad4bb022e848dec80d6fe5f73fe87061a2 Author: Leo Yan AuthorDate: Mon, 21 Oct 2019 15:48:08 +08:00 Committer: Arnaldo Carvalho de Melo CommitterDate: Wed, 06 Nov 2019 15:43:05 -03:00 perf cs-etm: Fix definition of macro TO_CS_QUEUE_NR Macro TO_CS_QUEUE_NR definition has a typo, which uses 'trace_id_chan' as its parameter, this doesn't match with its definition body which uses 'trace_chan_id'. So renames the parameter to 'trace_chan_id'. It's luck to have a local variable 'trace_chan_id' in the function cs_etm__setup_queue(), even we wrongly define the macro TO_CS_QUEUE_NR, the local variable 'trace_chan_id' is used rather than the macro's parameter 'trace_id_chan'; so the compiler doesn't complain for this before. After renaming the parameter, it leads to a compiling error due cs_etm__setup_queue() has no variable 'trace_id_chan'. This patch uses the variable 'trace_chan_id' for the macro so that fixes the compiling error. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight ml Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20191021074808.25795-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/cs-etm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index 4ba0f87..f5f855f 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -110,7 +110,7 @@ static int cs_etm__decode_data_block(struct cs_etm_queue *etmq); * encode the etm queue number as the upper 16 bit and the channel as * the lower 16 bit. */ -#define TO_CS_QUEUE_NR(queue_nr, trace_id_chan) \ +#define TO_CS_QUEUE_NR(queue_nr, trace_chan_id) \ (queue_nr << 16 | trace_chan_id) #define TO_QUEUE_NR(cs_queue_nr) (cs_queue_nr >> 16) #define TO_TRACE_CHAN_ID(cs_queue_nr) (cs_queue_nr & 0x0000ffff) @@ -819,7 +819,7 @@ static int cs_etm__setup_queue(struct cs_etm_auxtrace *etm, * Note that packets decoded above are still in the traceID's packet * queue and will be processed in cs_etm__process_queues(). */ - cs_queue_nr = TO_CS_QUEUE_NR(queue_nr, trace_id_chan); + cs_queue_nr = TO_CS_QUEUE_NR(queue_nr, trace_chan_id); ret = auxtrace_heap__add(&etm->heap, cs_queue_nr, timestamp); out: return ret;