All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] env_sf - Do not free flash environment on successful read
Date: Fri, 22 Oct 2010 13:48:55 +0200	[thread overview]
Message-ID: <4CC17A27.7010404@denx.de> (raw)
In-Reply-To: <20101022105619.D9A96136320@gemini.denx.de>

On 10/22/2010 12:56 PM, Wolfgang Denk wrote:
> Dear Oliver Dillinger,
> 

Hi Wolfgang,

> Also, this patch is not correct. It is OK to call spi_flash_free()
> here.
> 
> 
> The bug is in saveenv() for the non-redundant case. The function has
> not been dapted to the new environment code, at all; for example, it
> fails to actually export the internally stored environment [there is
> no call to hexport()].

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?).

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

  reply	other threads:[~2010-10-22 11:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22 10:20 [U-Boot] [PATCH] env_sf - Do not free flash environment on successful read Oliver Dillinger
2010-10-22 10:56 ` Wolfgang Denk
2010-10-22 11:48   ` Stefano Babic [this message]
2010-10-22 12:07     ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CC17A27.7010404@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.