From patchwork Sun Dec 29 17:24:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 182564 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5463822ild; Sun, 29 Dec 2019 09:51:12 -0800 (PST) X-Google-Smtp-Source: APXvYqzttMxVh1HFXiY+gHTo0OZUjbB/ccqtQGY2w1yRTJXX3Y1dPjlQqBSE49Zw5lU+ciJ6HRoD X-Received: by 2002:a9d:798e:: with SMTP id h14mr67534641otm.257.1577641872463; Sun, 29 Dec 2019 09:51:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577641872; cv=none; d=google.com; s=arc-20160816; b=fI6TFF7BbWYg+/CLfSV0kPT1fjWBK14c9qeHbY25BwdfWOAHdMWnVrE5MJOxa0juKr 0J6z+ykSKDaus4cP445OthJmfbbxpy3POBR9YsknZerwIUJv1z6voF7XcqfximRJviG6 QBfi5SMJObR+lbRrx+JqCf95ZN4BpyIuUbH040UWtlIASDb/acT5Yvs1Sd24pYuXBdA3 KbKw4CZ6PMMP5PvHRWWf8crSMBpX6T47MmkEDq0IL23fNrJ5R0J04WKemtf5U/wcDDMo S7C9OqCvikGIPvj7HI/OEe3PMPWtSNVe2OC+mSM4auce6TVi9nAzx3MujOxbi9/wasjf wQOA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/x8EMjiBrlOo5r1CL1aicMpFf4jDPRsS3yOz8cE054Y=; b=riLSITmoZMZowKfsJCjQ6gM4SihvXRSpbV49ql9NA0nhtOIgBCXKUbAXjsiezxxupv LZyB2g7GLhO8PKadpemODWC3P0IVXOb8WFTSSdUzpKtNa1ZIbnCmNFgUVruxVUdURxnw jVx+r76ZvnAyEW2aoPFwDdWxaGwx2mQEatswjeQ32C5Ryx763WwXCd5feBUXvFR9yY0Q eixpCc5dAokTzYp3jsMSSVbmJ0Hr2YSXjBG6eMW8XcayooEvGEtHazfJUybvSyCHKa2H vSnlKYMtIM7bdrDRXMK04ssuUcXhA6SdfdtOcaTkJGIiqccUXIT1HXFhqZ1+5lNqkqoi oloQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cEmJ1rAJ; 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 z11si15063565oic.176.2019.12.29.09.51.12; Sun, 29 Dec 2019 09:51:12 -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=cEmJ1rAJ; 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 S1732040AbfL2RvL (ORCPT + 27 others); Sun, 29 Dec 2019 12:51:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:36034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732017AbfL2RvF (ORCPT ); Sun, 29 Dec 2019 12:51:05 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 CF07B207FD; Sun, 29 Dec 2019 17:51:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641864; bh=kXUYMUazpeA9aa6t8663MGnk4sLrJM9Oq5+Y8rhQ32w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cEmJ1rAJuX4iyLW3pl/uO1BSa8SDl8jQtcr1h4GP4hUKj69vx3JDlyWBtLStCj3Io AdlnhCvmX2HD7rnMZtBxsBsb8bjR/wZGCJ03+4eGYRHgennz/qEvoRgsOReirMMAFI dmkfybNcYbqK53ZZXNYofj78QQ7uszs+ENa1x9Gs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, 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 , Sasha Levin Subject: [PATCH 5.4 244/434] perf cs-etm: Fix definition of macro TO_CS_QUEUE_NR Date: Sun, 29 Dec 2019 18:24:57 +0100 Message-Id: <20191229172718.090768227@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 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 [ Upstream commit 9d604aad4bb022e848dec80d6fe5f73fe87061a2 ] 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 Signed-off-by: Sasha Levin --- tools/perf/util/cs-etm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 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;