Re: [PATCH] [MTD] UBI: Fix counting of ec value

Artem Bityutskiy
2007-02-12T11:51:10Z

On Mon, 2007-02-12 at 11:48 +0100, Timo Lindhorst wrote:
> > So why have you moved this memory allocation here?
> Actually I have not moved up the allocation, but moved down the
> 'if (unlikely(ec > UBI_MAX_ERASECOUNTER)) { ... ' block, since we need
> to know the new ec value before we can do this test.

OK, fine, just free the memory there.

> > What's the point in the new 'ret' variable? Why ec += err does not work?
> I just thought adding an error code to a counter seems odd. Do you
> prefer this way?

Well, it's anyway better then a distinct variable IMO. Moreover, it is
used like this across the UBI code, so just assume it is UBI style :-)

--
Best regards,
Artem Bityutskiy (Битюцкий Артём)