From: Ben Hutchings Date: Sat, 22 Jul 2017 16:37:33 +0000 (+0100) Subject: perf tools: Fix unwind build on i386 X-Git-Tag: archive/raspbian/5.10.237-1+rpi1^2~48 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c29f0a9c9d6e2ac295490c982eef6b157f68877c;p=linux.git perf tools: Fix unwind build on i386 Forwarded: no EINVAL may not be defined when building unwind-libunwind.c with REMOTE_UNWIND_LIBUNWIND, resulting in a compiler error in LIBUNWIND__ARCH_REG_ID(). Its only caller, access_reg(), only checks for a negative return value and doesn't care what it is. So change -EINVAL to -1. Fixes: 52ffe0ff02fc ("Support x86(32-bit) cross platform callchain unwind.") Signed-off-by: Ben Hutchings Gbp-Pq: Topic bugfix/x86 Gbp-Pq: Name perf-tools-fix-unwind-build-on-i386.patch --- diff --git a/tools/perf/arch/x86/util/unwind-libunwind.c b/tools/perf/arch/x86/util/unwind-libunwind.c index 47357973b55..f2336605397 100644 --- a/tools/perf/arch/x86/util/unwind-libunwind.c +++ b/tools/perf/arch/x86/util/unwind-libunwind.c @@ -67,7 +67,7 @@ int LIBUNWIND__ARCH_REG_ID(int regnum) break; default: pr_err("unwind: invalid reg id %d\n", regnum); - return -EINVAL; + return -1; } return id; @@ -107,7 +107,7 @@ int LIBUNWIND__ARCH_REG_ID(int regnum) break; default: pr_err("unwind: invalid reg id %d\n", regnum); - return -EINVAL; + return -1; } return id;