[PATCH] KVM: arm64: fix boolreturn.cocci warnings

Sean Christopherson seanjc at google.com
Tue May 11 09:29:02 PDT 2021


On Tue, Apr 27, 2021, kernel test robot wrote:
> From: kernel test robot <lkp at intel.com>
> 
> 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")
> CC: Sean Christopherson <seanjc at google.com>
> Reported-by: kernel test robot <lkp at intel.com>
> Signed-off-by: kernel test robot <lkp at intel.com>
> ---

Reviewed-by: Sean Christopherson <seanjc at google.com>



More information about the linux-arm-kernel mailing list