dma-mapping: simplify dma_init_coherent_memory
authorChristoph Hellwig <hch@lst.de>
Wed, 23 Jun 2021 14:00:04 +0000 (16:00 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 18 Aug 2021 14:24:10 +0000 (16:24 +0200)
commita6933571f34a9aee843fff2aa4b96949c57d6274
treef78a642c481a942ab057e80a306966394a6e6f4a
parent70d6aa0ecfed253a2b14659a6c77359af6d9b3ee
dma-mapping: simplify dma_init_coherent_memory

Return the allocated dma_coherent_mem structure, set the
use_dma_pfn_offset and print the failure warning inside of
dma_init_coherent_memory instead of leaving that to the callers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Dillon Min <dillon.minfei@gmail.com>
kernel/dma/coherent.c