All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Fan <Peng.Fan@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] common: image-fdt: correct fdt_blob for IMAGE_FORMAT_LEGACY
Date: Tue, 24 Nov 2015 16:54:22 +0800	[thread overview]
Message-ID: <1448355263-545-3-git-send-email-Peng.Fan@freescale.com> (raw)
In-Reply-To: <1448355263-545-1-git-send-email-Peng.Fan@freescale.com>

If condition of "(load == image_start || load == image_data)" is true,
should use "fdt_addr = load;", but not "fdt_blob = (char *)image_data;",
or fdt_blob will be overridden by "fdt_blob = map_sysmem(fdt_addr, 0);"
at the end of the switch case.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Max Krummenacher <max.krummenacher@toradex.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Suriyan Ramasami <suriyan.r@gmail.com>
Cc: Paul Kocialkowski <contact@paulk.fr>
Cc: Tom Rini <trini@konsulko.com>
---
 common/image-fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/image-fdt.c b/common/image-fdt.c
index 5180a03..5e4e5bd 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -326,7 +326,7 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
 
 			if (load == image_start ||
 			    load == image_data) {
-				fdt_blob = (char *)image_data;
+				fdt_addr = load;
 				break;
 			}
 
-- 
2.6.2

  parent reply	other threads:[~2015-11-24  8:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24  8:54 [U-Boot] [PATCH] common: bootm: check return value of strict_strtoul Peng Fan
2015-11-24  8:54 ` [U-Boot] [RFC] common: cli_hush: avoid dead code Peng Fan
2015-11-24 19:04   ` Simon Glass
2015-12-06 22:06   ` [U-Boot] [U-Boot,RFC] " Tom Rini
2015-11-24  8:54 ` Peng Fan [this message]
2015-11-24 19:04   ` [U-Boot] [PATCH] common: image-fdt: correct fdt_blob for IMAGE_FORMAT_LEGACY Simon Glass
2015-11-25  1:12     ` Peng Fan
2015-12-01 20:01       ` Simon Glass
2015-12-06 22:06   ` [U-Boot] " Tom Rini
2015-11-24  8:54 ` [U-Boot] [PATCH] video: ipu: simplify if else code Peng Fan
2015-11-24  9:55   ` Stefano Babic
2015-11-24 19:04 ` [U-Boot] [PATCH] common: bootm: check return value of strict_strtoul Simon Glass
2015-12-06 22:05 ` [U-Boot] " Tom Rini

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=1448355263-545-3-git-send-email-Peng.Fan@freescale.com \
    --to=peng.fan@freescale.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.