[U-Boot] [PATCH] env_sf - Do not free flash environment on successful read
Wolfgang Denk
wd at denx.de
Fri Oct 22 14:07:27 CEST 2010
Dear Stefano Babic,
In message <4CC17A27.7010404 at denx.de> you wrote:
>
> You mean there are several bugs here....if spi_flash_free() is correct,
> then spi_flash_probe must be called inside the saveenv function, in case
> env_flash is not set (so it is called only once).
> And IMHO spi_flash_free() should be called for the redundant case, too
> (why is it different from the non-redundant case?).
Right. There are quite a number of different bugs in that code, and
potential for cleanup / optimization - ther eis probably no need to
have two different versions of the saveenv() function when only a few
lines are different.
The submitted patch would not help, though, as only the old
environment would be written back.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Anyone who knows history, particularly the history of Europe, will, I
think, recognize that the domination of education or of government by
any one particular religious faith is never a happy arrangement for
the people. - Eleanor Roosevelt
More information about the U-Boot
mailing list