[U-Boot] [PATCH 09/15] iMX28: Add GPMI NAND driver

Marek Vasut marek.vasut at gmail.com
Thu Sep 29 00:12:23 CEST 2011


On Wednesday, September 28, 2011 11:26:45 PM Scott Wood wrote:
> On 09/11/2011 11:06 PM, Marek Vasut wrote:
> > +static void mxs_nand_return_dma_descs(struct mxs_nand_info *info)
> > +{
> > +	int i = info->desc_index;
> > +	struct mxs_dma_desc *desc;
> > +
> > +	for (--i; i >= 0; i--) {
> 
> This is an awkward construct.
> 
> Why not just the usual:
> 
> for (i = 0; i < info->desc_index; i++)
> 

Checking the driver, this modifies the global data so this is ok


More information about the U-Boot mailing list