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>
This commit is contained in:
Christoph Hellwig 2020-10-07 11:04:08 +02:00
commit 849facea92
2 changed files with 39 additions and 74 deletions