[U-Boot-Users] [PATCH] cfi_flash.c bug fix

Grant Likely grant.likely at secretlab.ca
Wed Jul 4 18:25:46 CEST 2007


On 7/4/07, eran liberty <eran.liberty at gmail.com> wrote:
> On 7/4/07, Grant Likely <grant.likely at secretlab.ca> wrote:
> > My 'nitpick' is about the for loop becoming longer than 80chars, and
> > hence being wrapped to 3 lines which makes it harder to read.  I'd
> > prefer code that keeps the for(;;) statement short for readability.
> >
>
> Will taking the check inside the loop and breaking out, make us happy?
>
> for (j = 0; j < erase_region_count; j++) {
>    if (CFG_MAX_FLASH_SECT <= sect_cnt)
>        break;
>    ...
>    ...
> }

I prefer the other approach, but as long as it's readable I'm happy.
(It's that whole 'taste' think that Linus likes to talk about)

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195




More information about the U-Boot mailing list