diff options
| author | James Cowgill <[email protected]> | 2017-06-20 09:57:51 +0000 |
|---|---|---|
| committer | Radim Krčmář <[email protected]> | 2017-06-20 15:02:48 +0000 |
| commit | e27a9eca5d4a392b96ce5d5238c8d637bcb0a52c (patch) | |
| tree | a1af1f6ac43998a50e92e2ef0a62265d11482958 /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | |
| parent | Merge branch 'kvm-ppc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff) | |
| download | kernel-e27a9eca5d4a392b96ce5d5238c8d637bcb0a52c.tar.gz kernel-e27a9eca5d4a392b96ce5d5238c8d637bcb0a52c.zip | |
KVM: MIPS: Fix maybe-uninitialized build failure
This commit fixes a "maybe-uninitialized" build failure in
arch/mips/kvm/tlb.c when KVM, DYNAMIC_DEBUG and JUMP_LABEL are all
enabled. The failure is:
In file included from ./include/linux/printk.h:329:0,
from ./include/linux/kernel.h:13,
from ./include/asm-generic/bug.h:15,
from ./arch/mips/include/asm/bug.h:41,
from ./include/linux/bug.h:4,
from ./include/linux/thread_info.h:11,
from ./include/asm-generic/current.h:4,
from ./arch/mips/include/generated/asm/current.h:1,
from ./include/linux/sched.h:11,
from arch/mips/kvm/tlb.c:13:
arch/mips/kvm/tlb.c: In function ‘kvm_mips_host_tlb_inv’:
./include/linux/dynamic_debug.h:126:3: error: ‘idx_kernel’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
__dynamic_pr_debug(&descriptor, pr_fmt(fmt), \
^~~~~~~~~~~~~~~~~~
arch/mips/kvm/tlb.c:169:16: note: ‘idx_kernel’ was declared here
int idx_user, idx_kernel;
^~~~~~~~~~
There is a similar error relating to "idx_user". Both errors were
observed with GCC 6.
As far as I can tell, it is impossible for either idx_user or idx_kernel
to be uninitialized when they are later read in the calls to kvm_debug,
but to satisfy the compiler, add zero initializers to both variables.
Signed-off-by: James Cowgill <[email protected]>
Fixes: 57e3869cfaae ("KVM: MIPS/TLB: Generalise host TLB invalidate to kernel ASID")
Cc: <[email protected]> # 4.11+
Acked-by: James Hogan <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
0 files changed, 0 insertions, 0 deletions
