Deleted Added
full compact
282c282
< struct node *node)
---
> struct node *node, struct property *prop)
284c284
< struct property *prop;
---
> struct marker *m;
288,290c288,290
< prop = get_property(node, "linux,phandle");
< if (! prop)
< return; /* No phandle, that's fine */
---
> if (!streq(prop->name, "phandle")
> && !streq(prop->name, "linux,phandle"))
> return;
293,294c293,294
< FAIL(c, "%s has bad length (%d) linux,phandle property",
< node->fullpath, prop->val.len);
---
> FAIL(c, "%s has bad length (%d) %s property",
> node->fullpath, prop->val.len, prop->name);
297a298,316
> m = prop->val.markers;
> for_each_marker_of_type(m, REF_PHANDLE) {
> assert(m->offset == 0);
> if (node != get_node_by_ref(root, m->ref))
> /* "Set this node's phandle equal to some
> * other node's phandle". That's nonsensical
> * by construction. */ {
> FAIL(c, "%s in %s is a reference to another node",
> prop->name, node->fullpath);
> return;
> }
> /* But setting this node's phandle equal to its own
> * phandle is allowed - that means allocate a unique
> * phandle for this node, even if it's not otherwise
> * referenced. The value will be filled in later, so
> * no further checking for now. */
> return;
> }
>
298a318
>
300,301c320,321
< FAIL(c, "%s has invalid linux,phandle value 0x%x",
< node->fullpath, phandle);
---
> FAIL(c, "%s has bad value (0x%x) in %s property",
> node->fullpath, phandle, prop->name);
304a325,328
> if (node->phandle && (node->phandle != phandle))
> FAIL(c, "%s has %s property which replaces existing phandle information",
> node->fullpath, prop->name);
>
306c330
< if (other) {
---
> if (other && (other != node)) {
314c338
< NODE_CHECK(explicit_phandles, NULL, ERROR);
---
> PROP_CHECK(explicit_phandles, NULL, ERROR);