mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
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>
This commit is contained in:
parent
fa8bc7f928
commit
49300f2ade
5 changed files with 21 additions and 22 deletions
4
dtc.h
4
dtc.h
|
@ -114,7 +114,7 @@ struct data data_insert_at_marker(struct data d, struct marker *m,
|
|||
struct data data_merge(struct data d1, struct data d2);
|
||||
struct data data_append_cell(struct data d, cell_t word);
|
||||
struct data data_append_integer(struct data d, uint64_t word, int bits);
|
||||
struct data data_append_re(struct data d, const struct fdt_reserve_entry *re);
|
||||
struct data data_append_re(struct data d, uint64_t address, uint64_t size);
|
||||
struct data data_append_addr(struct data d, uint64_t addr);
|
||||
struct data data_append_byte(struct data d, uint8_t byte);
|
||||
struct data data_append_zeroes(struct data d, int len);
|
||||
|
@ -227,7 +227,7 @@ uint32_t guess_boot_cpuid(struct node *tree);
|
|||
/* Boot info (tree plus memreserve information */
|
||||
|
||||
struct reserve_info {
|
||||
struct fdt_reserve_entry re;
|
||||
uint64_t address, size;
|
||||
|
||||
struct reserve_info *next;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue