From patchwork Thu Nov 7 18:59:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 178816 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp1472895ilf; Thu, 7 Nov 2019 11:01:39 -0800 (PST) X-Google-Smtp-Source: APXvYqwTtXbgrnxaAiGVbwadz+FDKnO7VXA2XYvlT2DcN5JU6eeaPB7U8xb82N0tSdYLhfL3AoAM X-Received: by 2002:a17:906:7c55:: with SMTP id g21mr4720750ejp.48.1573153299786; Thu, 07 Nov 2019 11:01:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573153299; cv=none; d=google.com; s=arc-20160816; b=cIUOY8x1NPFGbH8BgANmPfTISAdiqCUR76O/pK9CcZXDEiD1TkVpsirPtSYoXj7QyT wsR4eg/MGltXYHTUNmoNLIZ3lKnr/9pVBQ4bqE584xKf22m0+m2uBiyglIr9etDz+kPM QQTzDNIehTPrMXK8jNhbih53elsOYdUsdAH4pw0BqvDJx0VbksojKt7HaiUPBKEczMDN xORacY90fUwkeK0Y6Ici8danVV0Un0u6z/EOxfgcUkOW1MRN/dmFYUsE3l5BfLjd91EI 4Z0IL4s7D6ADDMztPs43yE6lPW4BYHWJ3heWQFXZuAPT+VnApknev0T+lanK26M+ll5n bHmA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UQXzB4GgTn9cD6swhErWtBItm5oB63v5d0fbFFBTOGM=; b=L2VLKlIdjz5kjuGb2SL9GyYCKNJp0WN8Q2JkxmuFWnuTunY00pgeqM+IyD70mBfrA/ 23bFdQBiHgHi5dbHLYuewERBARytoj9QEhqnU46YNDMSr6okvdjxYFpn0WC9yhSskaNb suq1hL4/17pOTfSHJoLuzCw2ngeCmmfMjHWveIXfqL3V6vpp4RYQJ9wGcB3q0YLQueSH YRdedZVT5mQ+C+EY1o8TfT8O67gQLkgqW0rSjYsY9bL1Sp+M7fJ+hQSu3DSVnvySAVV5 X9xFJFIoLFFj+od8iJcrV3KZgaAeulHjD212GZHUWzZwAkJnPry7QMurDedEuU13SHtZ Yllg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DP0hI2tG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b47si2184576edc.129.2019.11.07.11.01.39; Thu, 07 Nov 2019 11:01:39 -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; dkim=pass header.i=@kernel.org header.s=default header.b=DP0hI2tG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728043AbfKGTBg (ORCPT + 26 others); Thu, 7 Nov 2019 14:01:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:40918 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725851AbfKGTBf (ORCPT ); Thu, 7 Nov 2019 14:01:35 -0500 Received: from quaco.ghostprotocols.net (179-240-172-58.3g.claro.net.br [179.240.172.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 46B5821882; Thu, 7 Nov 2019 19:01:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573153294; bh=mLv9srSdCScvSK+KObTSW8M2mnct2ipluEZmZHHVwpk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DP0hI2tG8tarJZYhxakyNh6eIUS8hLP86qHzkV4XQ5jN3qYsuvj0ktVNl3buzQ03H 39S1qnMNQ0bnzOCj3RC1I1gN5lCnO35Jo/wb71dWnwSV5jL1/dvmxns74SeFFBGUZ7 WCztfe0a/EUeY0nb8BMMvaTgqYeChAwQzAhK/X38= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Leo Yan , Mathieu Poirier , Alexander Shishkin , Jiri Olsa , Mark Rutland , Peter Zijlstra , Suzuki Poulouse , coresight ml , linux-arm-kernel@lists.infradead.org, Arnaldo Carvalho de Melo Subject: [PATCH 08/63] perf cs-etm: Fix definition of macro TO_CS_QUEUE_NR Date: Thu, 7 Nov 2019 15:59:16 -0300 Message-Id: <20191107190011.23924-9-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191107190011.23924-1-acme@kernel.org> References: <20191107190011.23924-1-acme@kernel.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leo Yan 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(-) -- 2.21.0 diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index 4ba0f871f086..f5f855fff412 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;