android_kernel_oneplus_msm8998/arch/arm64
Nathan Chancellor 929721249f arm64: percpu: Initialize ret in the default case
[ Upstream commit b5bb425871186303e6936fa2581521bdd1964a58 ]

Clang warns that if the default case is taken, ret will be
uninitialized.

./arch/arm64/include/asm/percpu.h:196:2: warning: variable 'ret' is used
uninitialized whenever switch default is taken
[-Wsometimes-uninitialized]
        default:
        ^~~~~~~
./arch/arm64/include/asm/percpu.h:200:9: note: uninitialized use occurs
here
        return ret;
               ^~~
./arch/arm64/include/asm/percpu.h:157:19: note: initialize the variable
'ret' to silence this warning
        unsigned long ret, loop;
                         ^
                          = 0

This warning appears several times while building the erofs filesystem.
While it's not strictly wrong, the BUILD_BUG will prevent this from
becoming a true problem. Initialize ret to 0 in the default case right
before the BUILD_BUG to silence all of these warnings.

Reported-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-11-27 16:08:00 +01:00
..
boot arm64: dts: stratix10: Correct System Manager register size 2018-11-21 09:27:37 +01:00
configs arm64 fixes and clean-ups: 2015-11-12 15:33:11 -08:00
crypto crypto: arm64/sha - avoid non-standard inline asm tricks 2018-11-27 16:07:58 +01:00
include arm64: percpu: Initialize ret in the default case 2018-11-27 16:08:00 +01:00
kernel arm64: cpufeature: Track 32bit EL0 support 2018-10-10 08:52:09 +02:00
kvm arm64: KVM: Sanitize PSTATE.M when being set from userspace 2018-10-10 08:52:09 +02:00
lib arm64: add KASAN support 2015-10-12 17:46:36 +01:00
mm arm64: Fix potential race with hardware DBM in ptep_set_access_flags() 2018-11-10 07:41:37 -08:00
net bpf, arm64: fix jit branch offset related to ldimm64 2017-05-14 13:32:58 +02:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig arm64: Add work around for Arm Cortex-A55 Erratum 1024718 2018-05-26 08:48:49 +02:00
Kconfig.debug arm64: remove redundant FRAME_POINTER kconfig option and force to select it 2015-11-10 10:36:00 +00:00
Kconfig.platforms ARM: tegra: select USB_ULPI from EHCI rather than platform 2018-02-25 11:03:51 +01:00
Makefile arm64: Disable asm-operand-width warning for clang 2018-11-27 16:07:59 +01:00