[U-Boot] [PATCH 1/9] i.MX31: fix SPI driver for shorter than 32 bit transfers

Scott Wood scottwood at freescale.com
Wed Feb 4 22:42:59 CET 2009


On Wed, Feb 04, 2009 at 10:30:32PM +0100, Wolfgang Denk wrote:
> Dear Guennadi Liakhovetski,
> 
> In message <Pine.LNX.4.64.0902041536070.6279 at axis700.grange> you wrote:
> > Fix 8 and 16-bit transfers in mxc_spi driver and a wrong pointer in the 
> > free routine.
> > 
> > Signed-off-by: Guennadi Liakhovetski <lg at denx.de>
> > ---
> ...
> >  	for (i = 0, in_l = (u32 *)din, out_l = (u32 *)dout;
> >  	     i < n_blks;
> > -	     i++, in_l++, out_l++, bitlen -= 32)
> > -		*in_l = spi_xchg_single(slave, *out_l, bitlen);
> > +	     i++, in_l++, out_l++)
> > +		*in_l = spi_xchg_single(slave, *out_l, flags);
> 
> Please use TABs for indentation, and add curly braces because of the
> multi-line for construct.

I think you mistook the continuation line for the for-body?  Why would
you want to TAB the continuation line, making it even less distinct from
the body of the for-statement?

Besides, the above patch doesn't change formatting in any way.

That said, it could certainly use most of the loop content being moved
into the body.

-Scott


More information about the U-Boot mailing list