From: Will Deacon Date: Thu, 4 Nov 2010 17:23:50 +0000 (+0100) Subject: ARM: 6469/1: perf-events: squash compiler warning X-Git-Tag: accepted/tizen/common/20141203.182822~9615^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3b291d98878a5f25fee56255bcfa420e85dff59;p=platform%2Fkernel%2Flinux-arm64.git ARM: 6469/1: perf-events: squash compiler warning armv7_pmnc_counter_has_overflowed can return uninitialised data if an invalid counter is specified. This patch fixes the code to return 0 in this case, which squashes the compiler warning from GCC 4.5. Signed-off-by: Will Deacon Signed-off-by: Russell King --- diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 49643b1..07a5035 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c @@ -1749,7 +1749,7 @@ static inline int armv7_pmnc_has_overflowed(unsigned long pmnc) static inline int armv7_pmnc_counter_has_overflowed(unsigned long pmnc, enum armv7_counters counter) { - int ret; + int ret = 0; if (counter == ARMV7_CYCLE_COUNTER) ret = pmnc & ARMV7_FLAG_C;