]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: PPC: Book3S HV: Use consistent type for return value of kvm_age_rmapp()
authorBo Liu <liubo03@inspur.com>
Fri, 1 Apr 2022 06:52:52 +0000 (02:52 -0400)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 18 May 2022 13:34:39 +0000 (23:34 +1000)
The return value type defined in the function kvm_age_rmapp() is
"bool", but the return value type defined in the implementation of the
function kvm_age_rmapp() is "int".

Change the return value type to "bool".

Signed-off-by: Bo Liu <liubo03@inspur.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220401065252.36472-1-liubo03@inspur.com
arch/powerpc/kvm/book3s_64_mmu_hv.c

index f622a39d64e0dc001ff32457086a3a178c58f39d..c036b1a22b0027a132b78041b70650e0deffac64 100644 (file)
@@ -887,7 +887,7 @@ static bool kvm_age_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,
        struct revmap_entry *rev = kvm->arch.hpt.rev;
        unsigned long head, i, j;
        __be64 *hptep;
-       int ret = 0;
+       bool ret = false;
        unsigned long *rmapp;
 
        rmapp = &memslot->arch.rmap[gfn - memslot->base_gfn];
@@ -895,7 +895,7 @@ static bool kvm_age_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,
        lock_rmap(rmapp);
        if (*rmapp & KVMPPC_RMAP_REFERENCED) {
                *rmapp &= ~KVMPPC_RMAP_REFERENCED;
-               ret = 1;
+               ret = true;
        }
        if (!(*rmapp & KVMPPC_RMAP_PRESENT)) {
                unlock_rmap(rmapp);
@@ -927,7 +927,7 @@ static bool kvm_age_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot,
                                rev[i].guest_rpte |= HPTE_R_R;
                                note_hpte_modification(kvm, &rev[i]);
                        }
-                       ret = 1;
+                       ret = true;
                }
                __unlock_hpte(hptep, be64_to_cpu(hptep[0]));
        } while ((i = j) != head);