Re: [PATCH] dma-contiguous: cleanup dma_alloc_contiguous

2020-07-22 Thread Christoph Hellwig
On Wed, Jul 22, 2020 at 11:00:48PM -0700, Nicolin Chen wrote: > On Wed, Jul 22, 2020 at 04:43:07PM +0200, Christoph Hellwig wrote: > > 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

Re: [PATCH] dma-contiguous: cleanup dma_alloc_contiguous

2020-07-22 Thread Nicolin Chen
On Wed, Jul 22, 2020 at 04:43:07PM +0200, Christoph Hellwig wrote: > 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 d

[PATCH] dma-contiguous: cleanup dma_alloc_contiguous

2020-07-22 Thread Christoph Hellwig
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: C