dma-direct: clean up the remapping checks in dma_direct_alloc
authorChristoph Hellwig <hch@lst.de>
Tue, 9 Nov 2021 14:20:40 +0000 (15:20 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 7 Dec 2021 11:48:09 +0000 (12:48 +0100)
commitf3c962226dbec7a611ddd4eb7af7f4e19f4790ea
tree2ef0c38e670817c1b105eea2e1aa092d7b29a7bc
parenta90cf30437489343b8386ae87b4827b6d6c3ed50
dma-direct: clean up the remapping checks in dma_direct_alloc

Add two local variables to track if we want to remap the returned
address using vmap or call dma_set_uncached and use that to simplify
the code flow.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
kernel/dma/direct.c