summaryrefslogtreecommitdiff
path: root/tools/fdtgrep.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-12-08 09:55:34 -0700
committerSimon Glass <sjg@chromium.org>2021-12-17 09:44:59 -0700
commit70ab7b1799112398047be63cc113f93955f0f352 (patch)
treea350ab336e7b2160df046be1d840eb9969abe22f /tools/fdtgrep.c
parent1c11b5e6f67ca5aeb2d61e198298ed655311070e (diff)
fdtgrep: Correct alignment of struct section
When outputting a devicetree we should not align the struct section to a 16-byte boundary. The normal position is fine, which is 8-byte aligned. This avoids leaving adding 8 extra zero bytes in the output tree in the case where the reserved section is empty (i.e has 16 zero bytes). Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/fdtgrep.c')
-rw-r--r--tools/fdtgrep.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/fdtgrep.c b/tools/fdtgrep.c
index db512465db..641d6a2e3e 100644
--- a/tools/fdtgrep.c
+++ b/tools/fdtgrep.c
@@ -438,8 +438,7 @@ static int dump_fdt_regions(struct display_info *disp, const void *blob,
fdt = (struct fdt_header *)out;
memset(fdt, '\0', sizeof(*fdt));
fdt_set_magic(fdt, FDT_MAGIC);
- struct_start = FDT_ALIGN(sizeof(struct fdt_header),
- sizeof(struct fdt_reserve_entry));
+ struct_start = sizeof(struct fdt_header);
fdt_set_off_mem_rsvmap(fdt, struct_start);
fdt_set_version(fdt, FDT_LAST_SUPPORTED_VERSION);
fdt_set_last_comp_version(fdt, FDT_FIRST_SUPPORTED_VERSION);