Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf arm64/s390: Fix printf conversion specifier for IP addresses

We need to use "%#" PRIx64 for u64 values, not "%lx". In arm64's and
s390x cases the compiler doesn't complain, but lets fix this in case
this code gets copied to a 32-bit arch, like with powerpc 32-bit that
got fixed in the previous patch.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Hewenliang <hewenliang4@huawei.com>
Cc: Hu Shiyuan <hushiyuan@huawei.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+4 -2
+2 -1
tools/perf/arch/arm64/util/machine.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 3 + #include <inttypes.h> 3 4 #include <stdio.h> 4 5 #include <string.h> 5 6 #include "debug.h" ··· 24 23 p->end += SYMBOL_LIMIT; 25 24 else 26 25 p->end = c->start; 27 - pr_debug4("%s sym:%s end:%#lx\n", __func__, p->name, p->end); 26 + pr_debug4("%s sym:%s end:%#" PRIx64 "\n", __func__, p->name, p->end); 28 27 }
+2 -1
tools/perf/arch/s390/util/machine.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 + #include <inttypes.h> 2 3 #include <unistd.h> 3 4 #include <stdio.h> 4 5 #include <string.h> ··· 49 48 p->end = roundup(p->end, page_size); 50 49 else 51 50 p->end = c->start; 52 - pr_debug4("%s sym:%s end:%#lx\n", __func__, p->name, p->end); 51 + pr_debug4("%s sym:%s end:%#" PRIx64 "\n", __func__, p->name, p->end); 53 52 }