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 <thomas@m3y3r.de>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
This commit is contained in:
Thomas Meyer 2017-09-21 00:29:36 +02:00 committed by Paul Mackerras
parent 4bb817ed83
commit 4bdcb7016f

View File

@ -377,7 +377,7 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
start = vma->vm_pgoff; start = vma->vm_pgoff;
end = start + end = start +
((vma->vm_end - vma->vm_start) >> PAGE_SHIFT); vma_pages(vma);
pfn = start + ((hva - vma->vm_start) >> PAGE_SHIFT); pfn = start + ((hva - vma->vm_start) >> PAGE_SHIFT);