* [PATCH 6/7] KVM: PPC: Cocci spatch "vma_pages"
[not found] <1505946334393-568186305-0-diffsplit-thomas@m3y3r.de>
@ 2017-09-20 22:29 ` Thomas Meyer
2017-10-19 3:46 ` Paul Mackerras
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Meyer @ 2017-09-20 22:29 UTC (permalink / raw)
To: agraf, benh, paulus, mpe, kvm-ppc, linuxppc-dev, linux-kernel
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>
---
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 6/7] KVM: PPC: Cocci spatch "vma_pages"
2017-09-20 22:29 ` [PATCH 6/7] KVM: PPC: Cocci spatch "vma_pages" Thomas Meyer
@ 2017-10-19 3:46 ` Paul Mackerras
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mackerras @ 2017-10-19 3:46 UTC (permalink / raw)
To: Thomas Meyer; +Cc: agraf, benh, mpe, kvm-ppc, linuxppc-dev, linux-kernel
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 <thomas@m3y3r.de>
Thanks, applied to my kvm-ppc-next branch, with the headline "KVM:
PPC: BookE: Use vma_pages function".
Paul.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-19 3:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1505946334393-568186305-0-diffsplit-thomas@m3y3r.de>
2017-09-20 22:29 ` [PATCH 6/7] KVM: PPC: Cocci spatch "vma_pages" Thomas Meyer
2017-10-19 3:46 ` Paul Mackerras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).