diff options
author | Thomas Meyer <thomas@m3y3r.de> | 2017-09-21 01:29:36 +0300 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-10-09 15:53:56 +0300 |
commit | 7a8e4158bf6700607bf361dfbaaac7c901f1134a (patch) | |
tree | b8d3d9083cae10816f56118b09a87c36eae8e91c /arch/mips/mm | |
parent | 8a5776a5f49812d29fe4b2d0a2d71675c3facf3f (diff) | |
download | linux-7a8e4158bf6700607bf361dfbaaac7c901f1134a.tar.xz |
MIPS: 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>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17333/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mm')
-rw-r--r-- | arch/mips/mm/dma-default.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index c01bd20d0208..bfd504c92719 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c @@ -179,7 +179,7 @@ static int mips_dma_mmap(struct device *dev, struct vm_area_struct *vma, void *cpu_addr, dma_addr_t dma_addr, size_t size, unsigned long attrs) { - 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 addr = (unsigned long)cpu_addr; unsigned long off = vma->vm_pgoff; |