Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 8763/1: dma-mapping: Use vma_pages()

Use vma_pages() function instead of open coding it.

Generated by scripts/coccinelle/api/vma_pages.cocci.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

authored by

Fabio Estevam and committed by
Russell King
a70c3ee3 046835b4

+1 -1
+1 -1
arch/arm/mm/dma-mapping.c
··· 845 845 unsigned long attrs) 846 846 { 847 847 int ret; 848 - unsigned long nr_vma_pages = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; 848 + unsigned long nr_vma_pages = vma_pages(vma); 849 849 unsigned long nr_pages = PAGE_ALIGN(size) >> PAGE_SHIFT; 850 850 unsigned long pfn = dma_to_pfn(dev, dma_addr); 851 851 unsigned long off = vma->vm_pgoff;