]> git.baikalelectronics.ru Git - kernel.git/commitdiff
perf dlfilter dlfilter-show-cycles: Fix types for print format
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 5 Sep 2022 07:47:35 +0000 (10:47 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 8 Sep 2022 15:17:45 +0000 (12:17 -0300)
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: 7e3c01ad672c97f7 ("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>
tools/perf/dlfilters/dlfilter-show-cycles.c

index 9eccc97bff82f64108545ca6a5eedb59a70aa6e8..6d47298ebe9f61fc1fc1c0a799a0f4ec5bd2f9b2 100644 (file)
@@ -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)