[flashrom] [PATCH] Partial write cleanups
Michael Karcher
flashrom at mkarcher.dialup.fu-berlin.de
Fri Nov 5 08:53:32 CET 2010
Am Donnerstag, den 04.11.2010, 05:20 +0100 schrieb Carl-Daniel
Hailfinger:
> > Or, wait a moment! Do you see some similarity between the assignment in
> > the if and the assignment before the break? Yes! The expressions are
> > identical. So: remove the first_len assignment before the break, you
> > also don't need to clear a flag in that block, just break. And then you
> > do the first_len assignment if the variable till now known as result is
> > set. The logic is that the loop always terminates at the end of the
> > region to write. Which might either be because of the loop end condition
> > or the matching compare - who cares, actually.
> I actually had that cleanup included in an earlier partial write patch,
> but decided to scratch it because I was still searching for the bug in
> the partial write patch back then.
The special suggested modification is not in, but I like the new version
already much better.
Acked-by: Michael Karcher <flashrom at mkarcher.dialup.fu-berlin.de>
Regards,
Michael Karcher
More information about the flashrom
mailing list