diff options
author | Thomas Meyer <thomas@m3y3r.de> | 2017-09-21 00:29:36 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2017-09-25 15:29:39 +0200 |
commit | 64c99853baca40e2f06038c4a926009edd14c7c3 (patch) | |
tree | a45ece6350bfcb892d22b0dbef62004e553749b1 /arch/microblaze/kernel | |
parent | 0add53713b1c07a1c71e27a20e21eb7c180b4e7b (diff) | |
download | linux-64c99853baca40e2f06038c4a926009edd14c7c3.tar.bz2 |
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>
Diffstat (limited to 'arch/microblaze/kernel')
-rw-r--r-- | arch/microblaze/kernel/dma.c | 2 |
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, 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; |