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/ _______________________________________________ flashrom mailing list [email protected] http://www.flashrom.org/mailman/listinfo/flashrom
