aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShunsuke Nakamura <nakamura.shun@fujitsu.com>2021-10-06 18:57:03 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-27 09:59:52 +0200
commit65eec1fb58c1b7ff2660a8b530eac10f25a35ba3 (patch)
treec1bd7a1d451eeccfd1fc3edadd9d8cc896a8c8cf
parentb6062308c510375cb2d756fb34b41db012ff325f (diff)
downloadlinux-yocto-65eec1fb58c1b7ff2660a8b530eac10f25a35ba3.tar.gz
linux-yocto-65eec1fb58c1b7ff2660a8b530eac10f25a35ba3.tar.bz2
linux-yocto-65eec1fb58c1b7ff2660a8b530eac10f25a35ba3.zip
libperf test evsel: Fix build error on !x86 architectures
[ Upstream commit f304c8d949f9adc2ef51304b63e49d5ea1c2d288 ] In test_stat_user_read, following build error occurs except i386 and x86_64 architectures: tests/test-evsel.c:129:31: error: variable 'pc' set but not used [-Werror=unused-but-set-variable] struct perf_event_mmap_page *pc; Fix build error. Signed-off-by: Shunsuke Nakamura <nakamura.shun@fujitsu.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20211006095703.477826-1-nakamura.shun@fujitsu.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--tools/lib/perf/tests/test-evsel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/perf/tests/test-evsel.c b/tools/lib/perf/tests/test-evsel.c
index a184e4861627..9abd4c0bf6db 100644
--- a/tools/lib/perf/tests/test-evsel.c
+++ b/tools/lib/perf/tests/test-evsel.c
@@ -148,6 +148,7 @@ static int test_stat_user_read(int event)
__T("failed to mmap evsel", err == 0);
pc = perf_evsel__mmap_base(evsel, 0, 0);
+ __T("failed to get mmapped address", pc);
#if defined(__i386__) || defined(__x86_64__)
__T("userspace counter access not supported", pc->cap_user_rdpmc);