dma-direct: simplify the DMA_ATTR_NO_KERNEL_MAPPING handling
authorChristoph Hellwig <hch@lst.de>
Wed, 7 Oct 2020 09:04:08 +0000 (11:04 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 7 Oct 2020 09:09:20 +0000 (11:09 +0200)
commit849facea92fa68d9292f9b06d7c4ee9e7a06b8dc
treed7225bfe41003dc1ea8105e920bcf938dcd66d6e
parent5b138c534fda57c2ebc1e6de72578aa1d70788a6
dma-direct: simplify the DMA_ATTR_NO_KERNEL_MAPPING handling

Use and entirely separate code path for the DMA_ATTR_NO_KERNEL_MAPPING
path.  This avoids any confusion about the ret type, and avoids lots of
attr checks and helpers that can be significantly simplified now.

It also ensures that common handling is applied to architetures still
using the arch alloc/free hooks.

Signed-off-by: Christoph Hellwig <hch@lst.de>
include/linux/dma-map-ops.h
kernel/dma/direct.c