Skip to content

Commit

Permalink
perf dlfilter dlfilter-show-cycles: Fix types for print format
Browse files Browse the repository at this point in the history
[ Upstream commit 1706623 ]

Avoid compiler warning about format %llu that expects long long unsigned
int but argument has type __u64.

Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Fixes: c3afd6e ("perf dlfilter: Add dlfilter-show-cycles")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20220905074735.4513-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
ahunter6 authored and gregkh committed Sep 15, 2022
1 parent 7bb2200 commit 4357706
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/perf/dlfilters/dlfilter-show-cycles.c
Expand Up @@ -98,9 +98,9 @@ int filter_event_early(void *data, const struct perf_dlfilter_sample *sample, vo
static void print_vals(__u64 cycles, __u64 delta)
{
if (delta)
printf("%10llu %10llu ", cycles, delta);
printf("%10llu %10llu ", (unsigned long long)cycles, (unsigned long long)delta);
else
printf("%10llu %10s ", cycles, "");
printf("%10llu %10s ", (unsigned long long)cycles, "");
}

int filter_event(void *data, const struct perf_dlfilter_sample *sample, void *ctx)
Expand Down

0 comments on commit 4357706

Please sign in to comment.