aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2020-01-24 08:46:57 -0600
committerDavid Gibson <david@gibson.dropbear.id.au>2020-01-29 14:41:33 +1100
commitcc6a5a07150427b7b527fc753cd09f8bf518cd9c (patch)
tree455556a52b4a29cd6e6c306654aa862a919d66fa
parent0e9225eb0dfec51def612b928d2f1836b092bc7e (diff)
downloaddtc-cc6a5a07150427b7b527fc753cd09f8bf518cd9c.zip
dtc-cc6a5a07150427b7b527fc753cd09f8bf518cd9c.tar.gz
dtc-cc6a5a07150427b7b527fc753cd09f8bf518cd9c.tar.bz2
Revert "yamltree: Ensure consistent bracketing of properties with phandles"
This reverts commit 18d7b2f4ee45fec422b7d82bab0b3c762ee907e4. This doesn't work for properties such as 'interrupt-map' that has phandle in the middle of an entry. It would also not work for a 0 or -1 phandle value that acts as a NULL. Signed-off-by: Rob Herring <robh@kernel.org> Message-Id: <20200124144657.29749-1-robh@kernel.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--yamltree.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/yamltree.c b/yamltree.c
index 43ca869..5b6ea8e 100644
--- a/yamltree.c
+++ b/yamltree.c
@@ -138,27 +138,6 @@ static void yaml_propval(yaml_emitter_t *emitter, struct property *prop)
(yaml_char_t *)YAML_SEQ_TAG, 1, YAML_FLOW_SEQUENCE_STYLE);
yaml_emitter_emit_or_die(emitter, &event);
- /* Ensure we have a type marker before any phandle */
- for_each_marker(m) {
- int last_offset = 0;
- struct marker *type_m;
-
- if (m->type >= TYPE_UINT8)
- last_offset = m->offset;
-
- if (!(m->next && m->next->type == REF_PHANDLE &&
- last_offset < m->next->offset))
- continue;
-
- type_m = xmalloc(sizeof(*type_m));
- type_m->offset = m->next->offset;
- type_m->type = TYPE_UINT32;
- type_m->ref = NULL;
- type_m->next = m->next;
- m->next = type_m;
- }
-
- m = prop->val.markers;
for_each_marker(m) {
int chunk_len;
char *data = &prop->val.val[m->offset];