From: Thomas Meyer Date: Wed, 20 Sep 2017 22:29:36 +0000 (+0200) Subject: KVM: PPC: BookE: Use vma_pages function X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4bdcb7016f95dd7668cd2f55f494ba449443e8d7;p=openwrt%2Fstaging%2Fblogic.git KVM: PPC: BookE: Use vma_pages function Use vma_pages function on vma object instead of explicit computation. Found by coccinelle spatch "api/vma_pages.cocci" Signed-off-by: Thomas Meyer Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c index c6c734424c70..423b21393bc9 100644 --- a/arch/powerpc/kvm/e500_mmu_host.c +++ b/arch/powerpc/kvm/e500_mmu_host.c @@ -377,7 +377,7 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500, 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);