]> git.baikalelectronics.ru Git - kernel.git/commit
libperf: Fix 32-bit build for tests uint64_t printf
authorRob Herring <robh@kernel.org>
Tue, 1 Feb 2022 21:39:03 +0000 (15:39 -0600)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 16 Feb 2022 16:49:24 +0000 (13:49 -0300)
commit611d995f774a6c5806a8ec1cd3af673460a82e73
treee4737e2056a6a724bb40f0d6f81e2f6a159b7b1a
parentbc475c3989a2be2b3d38c1b81772481c73e4018f
libperf: Fix 32-bit build for tests uint64_t printf

Commit 8a3f5512c36cb74a ("libperf tests: Add test_stat_multiplexing test")
added printf's of 64-bit ints using %lu which doesn't work on 32-bit
builds:

  tests/test-evlist.c:529:29: error: format ‘%lu’ expects argument of type \
    ‘long unsigned int’, but argument 4 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Werror=format=]

Use PRIu64 instead which works on both 32-bit and 64-bit systems.

Fixes: 8a3f5512c36cb74a ("libperf tests: Add test_stat_multiplexing test")
Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
Link: https://lore.kernel.org/r/20220201213903.699656-1-robh@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/perf/tests/test-evlist.c