of: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
@@ -141,7 +141,7 @@ static int of_overlay_apply_single_device_node(struct of_overlay *ov,
|
||||
of_node_put(tchild);
|
||||
} else {
|
||||
/* create empty tree as a target */
|
||||
tchild = __of_node_dup(child, "%s/%s", target->full_name, cname);
|
||||
tchild = __of_node_dup(child, "%pOF/%s", target, cname);
|
||||
if (!tchild)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -177,8 +177,8 @@ static int of_overlay_apply_one(struct of_overlay *ov,
|
||||
for_each_property_of_node(overlay, prop) {
|
||||
ret = of_overlay_apply_single_property(ov, target, prop);
|
||||
if (ret) {
|
||||
pr_err("Failed to apply prop @%s/%s\n",
|
||||
target->full_name, prop->name);
|
||||
pr_err("Failed to apply prop @%pOF/%s\n",
|
||||
target, prop->name);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@@ -186,8 +186,8 @@ static int of_overlay_apply_one(struct of_overlay *ov,
|
||||
for_each_child_of_node(overlay, child) {
|
||||
ret = of_overlay_apply_single_device_node(ov, target, child);
|
||||
if (ret != 0) {
|
||||
pr_err("Failed to apply single node @%s/%s\n",
|
||||
target->full_name, child->name);
|
||||
pr_err("Failed to apply single node @%pOF/%s\n",
|
||||
target, child->name);
|
||||
of_node_put(child);
|
||||
return ret;
|
||||
}
|
||||
@@ -215,7 +215,7 @@ static int of_overlay_apply(struct of_overlay *ov)
|
||||
|
||||
err = of_overlay_apply_one(ov, ovinfo->target, ovinfo->overlay);
|
||||
if (err != 0) {
|
||||
pr_err("apply failed '%s'\n", ovinfo->target->full_name);
|
||||
pr_err("apply failed '%pOF'\n", ovinfo->target);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
@@ -400,8 +400,8 @@ int of_overlay_create(struct device_node *tree)
|
||||
/* build the overlay info structures */
|
||||
err = of_build_overlay_info(ov, tree);
|
||||
if (err) {
|
||||
pr_err("of_build_overlay_info() failed for tree@%s\n",
|
||||
tree->full_name);
|
||||
pr_err("of_build_overlay_info() failed for tree@%pOF\n",
|
||||
tree);
|
||||
goto err_free_idr;
|
||||
}
|
||||
|
||||
@@ -480,9 +480,8 @@ static int overlay_is_topmost(struct of_overlay *ov, struct device_node *dn)
|
||||
/* check against each subtree affected by this overlay */
|
||||
list_for_each_entry(ce, &ovt->cset.entries, node) {
|
||||
if (overlay_subtree_check(ce->np, dn)) {
|
||||
pr_err("%s: #%d clashes #%d @%s\n",
|
||||
__func__, ov->id, ovt->id,
|
||||
dn->full_name);
|
||||
pr_err("%s: #%d clashes #%d @%pOF\n",
|
||||
__func__, ov->id, ovt->id, dn);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user