From: Thomas Meyer <thomas@m3y3r.de>
Date: Thu, 21 Sep 2017 00:29:36 +0200
Subject: KVM: PPC: BookE: Use vma_pages function
Patch-mainline: v4.15-rc1
Git-commit: 4bdcb7016f95dd7668cd2f55f494ba449443e8d7
References: bsc#1077761
Use vma_pages function on vma object instead of explicit computation.
Found by coccinelle spatch "api/vma_pages.cocci"
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Acked-by: Alexander Graf <agraf@suse.de>
---
arch/powerpc/kvm/e500_mmu_host.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/powerpc/kvm/e500_mmu_host.c
+++ b/arch/powerpc/kvm/e500_mmu_host.c
@@ -376,7 +376,7 @@
start = vma->vm_pgoff;
end = start +
- ((vma->vm_end - vma->vm_start) >> PAGE_SHIFT);
+ vma_pages(vma);
pfn = start + ((hva - vma->vm_start) >> PAGE_SHIFT);