From: Leo Yan Date: Thu, 14 Jan 2021 15:46:44 +0000 (+0800) Subject: perf c2c: Fix argument type for percent() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=111c141591178881314ba1b50d550d31cba34c1a;p=linux.git 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 Acked-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Don Zickus Cc: Ingo Molnar Cc: Joe Mario Cc: Joe Perches Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210114154646.209024-5-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index 7aaccea008831..7702f9599162a 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; }