[flashrom] [PATCH] Split out erase region walking

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Tue Jul 13 02:43:05 CEST 2010


On 12.07.2010 08:40, Michael Karcher wrote:
> Am Montag, den 12.07.2010, 03:23 +0200 schrieb Carl-Daniel Hailfinger:
>   
>> Thanks! Your suggestions indeed make sense, and the code is now a lot
>> simpler. New version follows.
>> I'm not sure if I should move start+=len into the counting expression of
>> the for loop. Comments welcome.
>>     
>
> My personal preference: Keep it outside. I expect the counting
> expression to only affect the variable(s) initialized in the init
> expression and/or tested in the loop condition. Logically, the increase
> of the start address seems (to me) more as part of the "do_something"
> than as part of the loop.
>   

OK.


>> +static int walk_eraseregions(struct flashchip *flash, int erasefunction, int (*do_something) (struct flashchip *flash, unsigned int addr, unsigned int len))
>>     
> This is an overly long line, please wrap it.
>
> My Ack still stands.
>   

Thanks for the review, committed in r1077 (region walking) and r1078
(line wrap).

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the flashrom mailing list