aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Meyer <thomas@m3y3r.de>2017-09-20 18:29:36 -0400
committerMichal Simek <michal.simek@xilinx.com>2017-09-25 09:29:39 -0400
commit64c99853baca40e2f06038c4a926009edd14c7c3 (patch)
treea45ece6350bfcb892d22b0dbef62004e553749b1
parent0add53713b1c07a1c71e27a20e21eb7c180b4e7b (diff)
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@m3y3r.de> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r--arch/microblaze/kernel/dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/microblaze/kernel/dma.c b/arch/microblaze/kernel/dma.c
index e45ada8fb006..94700c5270a9 100644
--- a/arch/microblaze/kernel/dma.c
+++ b/arch/microblaze/kernel/dma.c
@@ -165,7 +165,7 @@ int dma_direct_mmap_coherent(struct device *dev, struct vm_area_struct *vma,
165 unsigned long attrs) 165 unsigned long attrs)
166{ 166{
167#ifdef CONFIG_MMU 167#ifdef CONFIG_MMU
168 unsigned long user_count = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; 168 unsigned long user_count = vma_pages(vma);
169 unsigned long count = PAGE_ALIGN(size) >> PAGE_SHIFT; 169 unsigned long count = PAGE_ALIGN(size) >> PAGE_SHIFT;
170 unsigned long off = vma->vm_pgoff; 170 unsigned long off = vma->vm_pgoff;
171 unsigned long pfn; 171 unsigned long pfn;