diff options
author | 2017-03-06 12:04:45 +1100 | |
---|---|---|
committer | 2017-03-06 12:04:45 +1100 | |
commit | 49300f2ade6a6ad9b19957b1fce41fccfe1246a3 (patch) | |
tree | 8e469eef1e72f62296acba1c14eb022152ed425a /treesource.c | |
parent | fa8bc7f928ac25f23532afc8beb2073efc8fb063 (diff) |
dtc: Don't abuse struct fdt_reserve_entry
struct fdt_reserve_entry is defined in fdt.h to exactly mirror the
in-memory layout of a reserve entry in the flattened tree. Since that is
always big-endian, it uses fdt64_t elements, which have sparse annotations
marking them as not native endian.
However, in dtc, we also use struct fdt_reserve_entry inside struct
reserve_info, and use it with native endian values. This will cause sparse
errors.
This stops this abuse, making struct reserve_info have its own native
endian fields for the same information.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'treesource.c')
-rw-r--r-- | treesource.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/treesource.c b/treesource.c index c9d8967..2bc963f 100644 --- a/treesource.c +++ b/treesource.c @@ -275,8 +275,8 @@ void dt_to_source(FILE *f, struct dt_info *dti) for_each_label(re->labels, l) fprintf(f, "%s: ", l->label); fprintf(f, "/memreserve/\t0x%016llx 0x%016llx;\n", - (unsigned long long)re->re.address, - (unsigned long long)re->re.size); + (unsigned long long)re->address, + (unsigned long long)re->size); } write_tree_source_node(f, dti->dt, 0); |