lkml.org 
[lkml]   [2023]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] spi: tegra210-quad: Fix iterator outside loop
Date
> -----Original Message-----
> From: Mark Brown <broonie@kernel.org>
> Sent: 24 February 2023 23:26
> To: Krishna Yarlagadda <kyarlagadda@nvidia.com>
> Cc: linux-spi@vger.kernel.org; linux-tegra@vger.kernel.org; linux-
> kernel@vger.kernel.org; thierry.reding@gmail.com; Jonathan Hunter
> <jonathanh@nvidia.com>; Sowjanya Komatineni
> <skomatineni@nvidia.com>; Laxman Dewangan <ldewangan@nvidia.com>
> Subject: Re: [PATCH] spi: tegra210-quad: Fix iterator outside loop
>
> On Fri, Feb 24, 2023 at 04:50:00PM +0000, Krishna Yarlagadda wrote:
>
> > > > msg->actual_length += xfer->len;
> > > > + if (!xfer->cs_change && transfer_phase == DATA_TRANSFER)
> > > {
> > > > + tegra_qspi_transfer_end(spi);
> > > > + spi_transfer_delay_exec(xfer);
> > > > + }
> > > > transfer_phase++;
> > > > }
> > > > - if (!xfer->cs_change) {
> > > > - tegra_qspi_transfer_end(spi);
> > > > - spi_transfer_delay_exec(xfer);
> > > > - }
> updating the length of the message.
> > > This looks like it'll do the wrong thing and do a change on every
> > > transfer if cs_change isn't set?
>
> > This condition is hit only in data phase which is end of message.
>
> Shouldn't this just be moved into the DATA_TRANSFER case statement?
Calling transfer_end after updating message length.

\
 
 \ /
  Last update: 2023-03-27 00:37    [W:0.078 / U:1.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site