[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-d3267ad43dd8b3778f9b3deb9a3946c844bdc9dc@git.kernel.org>
Date: Fri, 15 Feb 2019 01:40:43 -0800
From: tip-bot for Mathieu Poirier <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mathieu.poirier@...aro.org, leo.yan@...aro.org,
linux-kernel@...r.kernel.org, hpa@...or.com, acme@...hat.com,
jolsa@...hat.com, tglx@...utronix.de, peterz@...radead.org,
mingo@...nel.org, suzuki.poulose@....com
Subject: [tip:perf/core] perf cs-etm: Fix wrong return values in error path
Commit-ID: d3267ad43dd8b3778f9b3deb9a3946c844bdc9dc
Gitweb: https://git.kernel.org/tip/d3267ad43dd8b3778f9b3deb9a3946c844bdc9dc
Author: Mathieu Poirier <mathieu.poirier@...aro.org>
AuthorDate: Tue, 12 Feb 2019 10:16:08 -0700
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 14 Feb 2019 15:18:06 -0300
perf cs-etm: Fix wrong return values in error path
Function cs_etm__mem_access() is supposed to return a u32 but the error
path returns negative values at a couple of places, something that really
throws off the clients using it. Fix the situation by return '0'.
Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Leo Yan <leo.yan@...aro.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Suzuki K Poulouse <suzuki.poulose@....com>
Cc: linux-arm-kernel@...ts.infradead.org
Link: http://lkml.kernel.org/r/20190212171618.25355-4-mathieu.poirier@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
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 1d9419a0cf0c..f396fee9bb95 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -324,7 +324,7 @@ static u32 cs_etm__mem_access(struct cs_etm_queue *etmq, u64 address,
struct addr_location al;
if (!etmq)
- return -1;
+ return 0;
machine = etmq->etm->machine;
cpumode = cs_etm__cpu_mode(etmq, address);
@@ -332,7 +332,7 @@ static u32 cs_etm__mem_access(struct cs_etm_queue *etmq, u64 address,
thread = etmq->thread;
if (!thread) {
if (cpumode != PERF_RECORD_MISC_KERNEL)
- return -EINVAL;
+ return 0;
thread = etmq->etm->unknown_thread;
}
Powered by blists - more mailing lists