From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] of: fdt: Fix fdt size_dt_struct
Date: Fri, 8 Nov 2013 15:23:42 +0100 [thread overview]
Message-ID: <1383920623-9803-1-git-send-email-s.hauer@pengutronix.de> (raw)
size_dt_struct was calculated too big, we have to substract ofs.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/of/fdt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 5055eee..b136dad 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -409,10 +409,9 @@ void *of_flatten_dtb(struct device_node *node)
fdt.dt_nextofs = dt_next_ofs(fdt.dt_nextofs, sizeof(struct fdt_node_header));
header.size_dt_strings = cpu_to_fdt32(fdt.str_nextofs);
- header.size_dt_struct = cpu_to_fdt32(fdt.dt_nextofs);
+ header.size_dt_struct = cpu_to_fdt32(fdt.dt_nextofs - ofs);
header.off_dt_struct = cpu_to_fdt32(ofs);
-
header.off_dt_strings = cpu_to_fdt32(fdt.dt_nextofs);
if (fdt.dt_size - fdt.dt_nextofs < fdt.str_nextofs) {
--
1.8.4.rc3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2013-11-08 14:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-08 14:23 Sascha Hauer [this message]
2013-11-08 14:23 ` [PATCH 2/2] of: fdt: reorder fdt_header initialization Sascha Hauer
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=1383920623-9803-1-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox