]> git.baikalelectronics.ru Git - kernel.git/commit
dma-contiguous: cleanup dma_alloc_contiguous
authorChristoph Hellwig <hch@lst.de>
Wed, 22 Jul 2020 14:33:43 +0000 (16:33 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 28 Jul 2020 11:42:15 +0000 (13:42 +0200)
commitdb3924c03b5c8cf390d6d049c757eaa76c7344f7
treea4b818c5a20d914a52c5525ed0eed8cd4483f4a4
parent50a9e8c204a45e92e152b8cb964f8e1aa68aa442
dma-contiguous: cleanup dma_alloc_contiguous

Split out a cma_alloc_aligned helper to deal with the "interesting"
calling conventions for cma_alloc, which then allows to the main
function to be written straight forward.  This also takes advantage
of the fact that NULL dev arguments have been gone from the DMA API
for a while.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nicolin Chen <nicoleotsuka@gmail.com>
Reviewed-by: Barry Song <song.bao.hua@hisilicon.com>
kernel/dma/contiguous.c