[igt-dev] [Intel-gfx] [PATCH igt] igt/perf_pmu: Fix 64b printf-isms

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Thu Feb 22 11:13:06 UTC 2018


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 at 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 at intel.com>

Regards,

Tvrtko


More information about the igt-dev mailing list