KVM: arm64: Fix boolreturn.cocci warnings
authorkernel test robot <lkp@intel.com>
Mon, 26 Apr 2021 22:33:57 +0000 (06:33 +0800)
committerMarc Zyngier <maz@kernel.org>
Sat, 15 May 2021 09:27:58 +0000 (10:27 +0100)
commitfcb8283920b135bca2916133e2383a501ad57eaa
tree37953e73d6447f78f6ad88dc41e6f933053bba13
parente44b49f623c77bee7451f1a82ccfb969c1028ae2
KVM: arm64: Fix boolreturn.cocci warnings

arch/arm64/kvm/mmu.c:1114:9-10: WARNING: return of 0/1 in function 'kvm_age_gfn' with return type bool
arch/arm64/kvm/mmu.c:1084:9-10: WARNING: return of 0/1 in function 'kvm_set_spte_gfn' with return type bool
arch/arm64/kvm/mmu.c:1127:9-10: WARNING: return of 0/1 in function 'kvm_test_age_gfn' with return type bool
arch/arm64/kvm/mmu.c:1070:9-10: WARNING: return of 0/1 in function 'kvm_unmap_gfn_range' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

Fixes: cd4c71835228 ("KVM: arm64: Convert to the gfn-based MMU notifier callbacks")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210426223357.GA45871@cd4295a34ed8
arch/arm64/kvm/mmu.c