[PATCH] kvm:powerpc:Fix return statements for wrapper functions in the file book3s_64_mmu_hv.c

Nicholas Krause xerofoify at gmail.com
Tue Aug 11 01:27:31 AEST 2015


This fixes the wrapper functions kvm_umap_hva_hv and the function
kvm_unmap_hav_range_hv to return the return value of the function
kvm_handle_hva or kvm_handle_hva_range that they are wrapped to
call internally rather then always making the caller of these
wrapper functions think they always run successfully by returning
the value of zero directly.

Signed-off-by: Nicholas Krause <xerofoify at gmail.com>
---
 arch/powerpc/kvm/book3s_64_mmu_hv.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c
index dab68b7..0905c8f 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
@@ -774,14 +774,12 @@ static int kvm_unmap_rmapp(struct kvm *kvm, unsigned long *rmapp,
 
 int kvm_unmap_hva_hv(struct kvm *kvm, unsigned long hva)
 {
-	kvm_handle_hva(kvm, hva, kvm_unmap_rmapp);
-	return 0;
+	return kvm_handle_hva(kvm, hva, kvm_unmap_rmapp);
 }
 
 int kvm_unmap_hva_range_hv(struct kvm *kvm, unsigned long start, unsigned long end)
 {
-	kvm_handle_hva_range(kvm, start, end, kvm_unmap_rmapp);
-	return 0;
+	return kvm_handle_hva_range(kvm, start, end, kvm_unmap_rmapp);
 }
 
 void kvmppc_core_flush_memslot_hv(struct kvm *kvm,
-- 
2.1.4



More information about the Linuxppc-dev mailing list