drm: prime: use sgtable iterators in drm_prime_sg_to_page_addr_arrays()
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 8 May 2020 14:05:14 +0000 (16:05 +0200)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 10 Sep 2020 06:17:48 +0000 (08:17 +0200)
commit0552daac2d18fc92c71c94492476b8eb521227e9
treee50576470ca8396e9fa41214044c0a965a13907e
parentd46e7ae24b81533d21edfa90914d27efa0c5f85d
drm: prime: use sgtable iterators in drm_prime_sg_to_page_addr_arrays()

Replace the current hand-crafted code for extracting pages and DMA
addresses from the given scatterlist by the much more robust
code based on the generic scatterlist iterators and recently
introduced sg_table-based wrappers. The resulting code is simple and
easy to understand, so the comment describing the old code is no
longer needed.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
drivers/gpu/drm/drm_prime.c