arm64: dma-mapping: Cocci spatch "vma_pages"
Use vma_pages function on vma object instead of explicit computation. Found by coccinelle spatch "api/vma_pages.cocci" Reviewed-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
parent
c2f0b54f10
commit
b4f4a27556
|
@ -303,8 +303,7 @@ static int __swiotlb_mmap_pfn(struct vm_area_struct *vma,
|
|||
unsigned long pfn, size_t size)
|
||||
{
|
||||
int ret = -ENXIO;
|
||||
unsigned long nr_vma_pages = (vma->vm_end - vma->vm_start) >>
|
||||
PAGE_SHIFT;
|
||||
unsigned long nr_vma_pages = vma_pages(vma);
|
||||
unsigned long nr_pages = PAGE_ALIGN(size) >> PAGE_SHIFT;
|
||||
unsigned long off = vma->vm_pgoff;
|
||||
|
||||
|
|
Loading…
Reference in New Issue