[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210114154646.209024-5-leo.yan@linaro.org>
Date: Thu, 14 Jan 2021 23:46:44 +0800
From: Leo Yan <leo.yan@...aro.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Joe Mario <jmario@...hat.com>, David Ahern <dsahern@...il.com>,
Don Zickus <dzickus@...hat.com>, Joe Perches <joe@...ches.com>,
linux-kernel@...r.kernel.org
Cc: Leo Yan <leo.yan@...aro.org>
Subject: [PATCH v4 4/6] perf c2c: Fix argument type for percent()
For percent(), its arguments are defined as integer type; this is not
consistent with its consumers which pass arguments with u32 type.
Thus this patch makes argument type as u32 for percent().
Signed-off-by: Leo Yan <leo.yan@...aro.org>
---
tools/perf/builtin-c2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 7aaccea00883..7702f9599162 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -876,7 +876,7 @@ static struct c2c_stats *total_stats(struct hist_entry *he)
return &hists->stats;
}
-static double percent(int st, int tot)
+static double percent(u32 st, u32 tot)
{
return tot ? 100. * (double) st / (double) tot : 0;
}
--
2.25.1
Powered by blists - more mailing lists