Skip to content

Commit

Permalink
dma-direct: use phys_to_dma_direct in dma_direct_alloc
Browse files Browse the repository at this point in the history
Replace the currently open code copy.

Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Christoph Hellwig authored and intel-lab-lkp committed Sep 9, 2020
1 parent 6097886 commit 9db870b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions kernel/dma/direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,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:
Expand Down

0 comments on commit 9db870b

Please sign in to comment.