Re: [PATCH v2 08/19] spi: dw: Discard dma_width member of the dw_spi structure
From: Andy Shevchenko
Date: Fri May 15 2020 - 09:50:01 EST
On Fri, May 15, 2020 at 04:05:59PM +0300, Serge Semin wrote:
> On Fri, May 15, 2020 at 04:03:05PM +0300, Andy Shevchenko wrote:
> > On Fri, May 15, 2020 at 01:47:47PM +0300, Serge Semin wrote:
> > > This member has exactly the same value as n_bytes of the DW SPI private
> > > data object, it's calculated at the same point of the transfer method,
> > > n_bytes isn't changed during the whole transfer, and they even serve for
> > > the same purpose - keep number of bytes per transfer word, though the
> > > dma_width is used only to calculate the DMA source/destination addresses
> > > width, which n_bytes could be also utilized for. Taking all of these
> > > into account let's replace the dma_width member usage with n_bytes one
> > > and remove the former.
> >
> > I've no strong opinion about this.
> > So, after addressing one issue below,
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
...
> > > -static enum dma_slave_buswidth convert_dma_width(u32 dma_width) {
> > > - if (dma_width == 1)
> >
> > > +static enum dma_slave_buswidth convert_dma_width(u8 n_bytes) {
> >
> > It seems somebody (maybe even me) at some point messed up between enum
> > definition and function that returns an enum.
> >
> > For what said, { should be on the separate line.
>
> See the patch 16/19: "spi: dw: Cleanup generic DW DMA code namings"
> in this series.
Since you are touching that line here, it makes sense to do it here rather than
ping-pong to other patch in very same series.
--
With Best Regards,
Andy Shevchenko