[PATCH 6/7] KVM: PPC: Cocci spatch "vma_pages"

STALE3272d

2 messages, 2 authors, 2017-10-19 · open the first message on its own page

[PATCH 6/7] KVM: PPC: Cocci spatch "vma_pages"

From: Thomas Meyer <hidden>
Date: 2017-09-20 22:38:35

Use vma_pages function on vma object instead of explicit computation.
Found by coccinelle spatch "api/vma_pages.cocci"

Signed-off-by: Thomas Meyer <redacted>
---

diff -u -p a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c
--- 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
 
 			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);
 

Re: [PATCH 6/7] KVM: PPC: Cocci spatch "vma_pages"

From: Paul Mackerras <hidden>
Date: 2017-10-19 03:49:24

On Thu, Sep 21, 2017 at 12:29:36AM +0200, Thomas Meyer wrote:
Use vma_pages function on vma object instead of explicit computation.
Found by coccinelle spatch "api/vma_pages.cocci"

Signed-off-by: Thomas Meyer <redacted>
Thanks, applied to my kvm-ppc-next branch, with the headline "KVM:
PPC: BookE: Use vma_pages function".

Paul.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help