From: Alessandro Rubini <rubini-list@gnudd.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] cmd_flash.c: fix compile error for boards with DataFlash
Date: Sun, 19 Jul 2009 18:33:17 +0200 [thread overview]
Message-ID: <20090719163317.GA18649@mail.gnudd.com> (raw)
From: Alessandro Rubini <rubini@gnudd.com>
The local variables addr_first and addr_last are used if HAS_DATAFLASH
even if SYS_NO_FLASH (meaning no NOR flash). This adds the definitions
withing the brace where the names are used, to avoid cluttering the
initial ifdef.
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
---
5 boards were not compiling with "./MAKEALL arm", now they all work.
Actually, even at91sam9263ek_nandflash_config was in error, but it's
not one of the MAKEALL targets. Should MAKEALL test all possible configs or not?
common/cmd_flash.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/common/cmd_flash.c b/common/cmd_flash.c
index bc651fa..4f12bbc 100644
--- a/common/cmd_flash.c
+++ b/common/cmd_flash.c
@@ -496,6 +496,8 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#ifdef CONFIG_HAS_DATAFLASH
if ((strcmp(argv[2], "all") != 0) && (strcmp(argv[2], "bank") != 0)) {
+ ulong addr_first, addr_last;
+
addr_first = simple_strtoul(argv[2], NULL, 16);
addr_last = simple_strtoul(argv[3], NULL, 16);
--
1.6.0.2
next reply other threads:[~2009-07-19 16:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-19 16:33 Alessandro Rubini [this message]
2009-07-19 17:36 ` [U-Boot] [PATCH] cmd_flash.c: fix compile error for boards with DataFlash 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=20090719163317.GA18649@mail.gnudd.com \
--to=rubini-list@gnudd.com \
--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.