diff options
author | Leo Yan <leo.yan@linaro.org> | 2021-01-14 18:46:44 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-01-20 20:34:20 +0300 |
commit | 111c141591178881314ba1b50d550d31cba34c1a (patch) | |
tree | c15ab86edab15ad4f2623bc034e59d7321ed5920 /tools/perf/builtin-c2c.c | |
parent | 69a95bfdf95b23ad9bd3d240cef92408823656f9 (diff) | |
download | linux-111c141591178881314ba1b50d550d31cba34c1a.tar.xz |
perf c2c: Fix argument type for percent()
For percent() its arguments are defined as integers; this is not
consistent with its consumers which pass u32 arguments.
Thus this patch makes argument type as u32 for percent().
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Joe Mario <jmario@redhat.com>
Cc: Joe Perches <joe@perches.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210114154646.209024-5-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-c2c.c')
-rw-r--r-- | tools/perf/builtin-c2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |