[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1505946334393-235092379-4-diffsplit-thomas@m3y3r.de>
Date: Thu, 21 Sep 2017 00:29:36 +0200
From: Thomas Meyer <thomas@...3r.de>
To: monstr@...str.eu, linux-kernel@...r.kernel.org
Subject: [PATCH 4/7] microblaze: Cocci spatch "vma_pages"
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@...3r.de>
---
diff -u -p a/arch/microblaze/kernel/dma.c b/arch/microblaze/kernel/dma.c
--- a/arch/microblaze/kernel/dma.c
+++ b/arch/microblaze/kernel/dma.c
@@ -165,7 +165,7 @@ int dma_direct_mmap_coherent(struct devi
unsigned long attrs)
{
#ifdef CONFIG_MMU
- unsigned long user_count = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+ unsigned long user_count = vma_pages(vma);
unsigned long count = PAGE_ALIGN(size) >> PAGE_SHIFT;
unsigned long off = vma->vm_pgoff;
unsigned long pfn;
Powered by blists - more mailing lists