MIPS: dma-default: Use vma_pages helper
PATCH 1/1 MIPS: dma-default: Use vma_pages helper
Use vma_pages function on vma object instead of explicit computation. arch/mips/mm/dma-default.c:182:34-40: WARNING: Consider using vma_pages helper on vma Generated by: scripts/coccinelle/api/vma_pages.cocci
Signed-off-by Vasyl Gomonovych <[email protected]>
--- arch/mips/mm/dma-default.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/mm/dma-default.c +1 -1
@@ -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;
Signature · 1 line
1.9.1