RE: [PATCH] spi: tegra210-quad: Fix iterator outside loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Mark Brown <broonie@xxxxxxxxxx>
> Sent: 24 February 2023 23:26
> To: Krishna Yarlagadda <kyarlagadda@xxxxxxxxxx>
> Cc: linux-spi@xxxxxxxxxxxxxxx; linux-tegra@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; thierry.reding@xxxxxxxxx; Jonathan Hunter
> <jonathanh@xxxxxxxxxx>; Sowjanya Komatineni
> <skomatineni@xxxxxxxxxx>; Laxman Dewangan <ldewangan@xxxxxxxxxx>
> 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.




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux