iommu/dma: Refactor iommu_dma_get_sgtable
authorChristoph Hellwig <hch@lst.de>
Mon, 20 May 2019 07:29:43 +0000 (09:29 +0200)
committerJoerg Roedel <jroedel@suse.de>
Mon, 27 May 2019 15:31:11 +0000 (17:31 +0200)
commit3fb3378bb1eb2905065211ab51a7bcc2c5e7bd29
tree66fb2035ecb4af0af02c51c50b0f643fae640247
parentee1ef05d02b03118e4c197e1193329f5b64246b7
iommu/dma: Refactor iommu_dma_get_sgtable

Inline __iommu_dma_get_sgtable_page into the main function, and use the
fact that __iommu_dma_get_pages return NULL for remapped contigous
allocations to simplify the code flow a bit.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/dma-iommu.c