]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: KVM: fix warning in mmu.c
authorMarc Zyngier <marc.zyngier@arm.com>
Thu, 30 Jan 2014 17:38:33 +0000 (17:38 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 3 Mar 2014 01:15:25 +0000 (01:15 +0000)
commitf282e24b7a43addd1bd906176ba5aaa9cf1829d6
tree0e65ada61e9411fdfcc2d693de724e4d863db263
parente994026dc4020501469578c379b451ba360b897f
ARM: KVM: fix warning in mmu.c

Compiling with THP enabled leads to the following warning:

arch/arm/kvm/mmu.c: In function ‘unmap_range’:
arch/arm/kvm/mmu.c:177:39: warning: ‘pte’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   if (kvm_pmd_huge(*pmd) || page_empty(pte)) {
                                        ^
Code inspection reveals that these two cases are mutually exclusive,
so GCC is a bit overzealous here. Silence it anyway by initializing
pte to NULL and testing it later on.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/kvm/mmu.c