Message ID | 20180222103300.19298-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 22/02/2018 10:33, Chris Wilson wrote: > My bad, > > perf_pmu.c: In function ‘accuracy’: > perf_pmu.c:1533:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t’ [-Wformat] > perf_pmu.c:1533:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘uint64_t’ [-Wformat] > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > --- > tests/perf_pmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c > index b9c4dd58..3bbb18d2 100644 > --- a/tests/perf_pmu.c > +++ b/tests/perf_pmu.c > @@ -1511,7 +1511,7 @@ accuracy(int gem_fd, const struct intel_execution_engine2 *e, > idle_ns += total_idle_ns; > > expected = (double)busy_ns / (busy_ns + idle_ns); > - igt_info("%u: busy %luus, idle %luus: %.2f%% (target: %lu%%)\n", > + igt_info("%u: busy %"PRIu64"us, idle %"PRIu64"us: %.2f%% (target: %lu%%)\n", > pass, busy_ns / 1000, idle_ns / 1000, > 100 * expected, target_busy_pct); > write(link[1], &expected, sizeof(expected)); > Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Regards, Tvrtko
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c index b9c4dd58..3bbb18d2 100644 --- a/tests/perf_pmu.c +++ b/tests/perf_pmu.c @@ -1511,7 +1511,7 @@ accuracy(int gem_fd, const struct intel_execution_engine2 *e, idle_ns += total_idle_ns; expected = (double)busy_ns / (busy_ns + idle_ns); - igt_info("%u: busy %luus, idle %luus: %.2f%% (target: %lu%%)\n", + igt_info("%u: busy %"PRIu64"us, idle %"PRIu64"us: %.2f%% (target: %lu%%)\n", pass, busy_ns / 1000, idle_ns / 1000, 100 * expected, target_busy_pct); write(link[1], &expected, sizeof(expected));
My bad, perf_pmu.c: In function ‘accuracy’: perf_pmu.c:1533:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t’ [-Wformat] perf_pmu.c:1533:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘uint64_t’ [-Wformat] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- tests/perf_pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)