[PATCH 14/28] dma-direct: use phys_to_dma_direct in dma_direct_alloc
Christoph Hellwig
hch at lst.de
Wed Aug 19 02:55:41 EDT 2020
Replace the currently open code copy.
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
kernel/dma/direct.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c
index 01120510968fa1..2e280b9c063449 100644
--- a/kernel/dma/direct.c
+++ b/kernel/dma/direct.c
@@ -235,10 +235,7 @@ void *dma_direct_alloc(struct device *dev, size_t size,
goto out_encrypt_pages;
}
done:
- if (force_dma_unencrypted(dev))
- *dma_handle = __phys_to_dma(dev, page_to_phys(page));
- else
- *dma_handle = phys_to_dma(dev, page_to_phys(page));
+ *dma_handle = phys_to_dma_direct(dev, page_to_phys(page));
return ret;
out_encrypt_pages:
--
2.28.0
More information about the Linux-nvme
mailing list