iommu/dma: Refactor iommu_dma_alloc
authorRobin Murphy <robin.murphy@arm.com>
Mon, 20 May 2019 07:29:37 +0000 (09:29 +0200)
committerJoerg Roedel <jroedel@suse.de>
Mon, 27 May 2019 15:31:11 +0000 (17:31 +0200)
commit072bebc0691737a6b44c648b4c59501a0cd25357
tree6b7c9c89cf1985a850fbb9d15c7eb37e19e7354c
parentbcf4b9c4c2ee0f00d9e273b19419416a20cce9a4
iommu/dma: Refactor iommu_dma_alloc

Shuffle around the self-contained atomic and non-contiguous cases to
return early and get out of the way of the CMA case that we're about to
work on next.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
[hch: slight changes to the code flow]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/dma-iommu.c