mirror of https://gitlab.com/qemu-project/dtc.git
Start with empty __local_fixups__ and __fixups__ nodes
When the meta nodes __local_fixups__ and __fixups__ are generated, and one of these (or both) already exist, the information contained there is duplicated at best and stale otherwise. So remove the nodes before starting to fill them. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
4ea851f5a4
commit
915daadbb6
17
livetree.c
17
livetree.c
|
@ -1056,16 +1056,29 @@ void generate_label_tree(struct dt_info *dti, const char *name, bool allocph)
|
|||
|
||||
void generate_fixups_tree(struct dt_info *dti, const char *name)
|
||||
{
|
||||
struct node *n = get_subnode(dti->dt, name);
|
||||
|
||||
/* Start with an empty __fixups__ node to not get duplicates */
|
||||
if (n)
|
||||
n->deleted = true;
|
||||
|
||||
if (!any_fixup_tree(dti, dti->dt))
|
||||
return;
|
||||
generate_fixups_tree_internal(dti, build_root_node(dti->dt, name),
|
||||
generate_fixups_tree_internal(dti,
|
||||
build_and_name_child_node(dti->dt, name),
|
||||
dti->dt);
|
||||
}
|
||||
|
||||
void generate_local_fixups_tree(struct dt_info *dti, const char *name)
|
||||
{
|
||||
struct node *n = get_subnode(dti->dt, name);
|
||||
|
||||
/* Start with an empty __local_fixups__ node to not get duplicates */
|
||||
if (n)
|
||||
n->deleted = true;
|
||||
if (!any_local_fixup_tree(dti, dti->dt))
|
||||
return;
|
||||
generate_local_fixups_tree_internal(dti, build_root_node(dti->dt, name),
|
||||
generate_local_fixups_tree_internal(dti,
|
||||
build_and_name_child_node(dti->dt, name),
|
||||
dti->dt);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue