Re: [PATCH 05/17] spi: dw: Discard static DW DMA slave structures

From: Andy Shevchenko
Date: Fri May 08 2020 - 15:44:45 EST


On Fri, May 08, 2020 at 04:29:30PM +0300, Serge Semin wrote:
> Having them declared is redundant since each struct dw_dma_chan has
> the same structure embedded and the structure from the passed dma_chan
> private pointer will be copied there as a result of the next calls
> chain:
> dma_request_channel() -> find_candidate() -> dma_chan_get() ->
> device_alloc_chan_resources() = dwc_alloc_chan_resources() ->
> dw_dma_filter().
> So just remove the static dw_dma_chan structures and use a locally
> declared data instance with dst_id/src_id set to the same values as
> the static copies used to have.

I'm not against it, but you may leave if for the future (see spi/for-next).

--
With Best Regards,
Andy Shevchenko