aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2017-06-01 16:50:55 -0400
committerRob Herring <robh@kernel.org>2017-07-18 18:09:18 -0400
commit0d638a07d3a1e98a7598eb2812a6236324e4c55f (patch)
tree5cca2869338b69318f5f758b0a6e8cb9ebaad69d
parentb4032ff9af1c266ca671682117ba73e1ba89a259 (diff)
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>
-rw-r--r--drivers/of/address.c21
-rw-r--r--drivers/of/base.c22
-rw-r--r--drivers/of/device.c2
-rw-r--r--drivers/of/dynamic.c33
-rw-r--r--drivers/of/irq.c10
-rw-r--r--drivers/of/of_mdio.c4
-rw-r--r--drivers/of/of_pci.c29
-rw-r--r--drivers/of/overlay.c21
-rw-r--r--drivers/of/platform.c32
-rw-r--r--drivers/of/property.c19
-rw-r--r--drivers/of/unittest.c67
11 files changed, 133 insertions, 127 deletions
diff --git a/drivers/of/address.c b/drivers/of/address.c
index 580bbf6ca2b1..ca1c0f6301ea 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -559,7 +559,7 @@ static u64 __of_translate_address(struct device_node *dev,
559 int na, ns, pna, pns; 559 int na, ns, pna, pns;
560 u64 result = OF_BAD_ADDR; 560 u64 result = OF_BAD_ADDR;
561 561
562 pr_debug("** translation for device %s **\n", of_node_full_name(dev)); 562 pr_debug("** translation for device %pOF **\n", dev);
563 563
564 /* Increase refcount at current level */ 564 /* Increase refcount at current level */
565 of_node_get(dev); 565 of_node_get(dev);
@@ -573,13 +573,13 @@ static u64 __of_translate_address(struct device_node *dev,
573 /* Count address cells & copy address locally */ 573 /* Count address cells & copy address locally */
574 bus->count_cells(dev, &na, &ns); 574 bus->count_cells(dev, &na, &ns);
575 if (!OF_CHECK_COUNTS(na, ns)) { 575 if (!OF_CHECK_COUNTS(na, ns)) {
576 pr_debug("Bad cell count for %s\n", of_node_full_name(dev)); 576 pr_debug("Bad cell count for %pOF\n", dev);
577 goto bail; 577 goto bail;
578 } 578 }
579 memcpy(addr, in_addr, na * 4); 579 memcpy(addr, in_addr, na * 4);
580 580
581 pr_debug("bus is %s (na=%d, ns=%d) on %s\n", 581 pr_debug("bus is %s (na=%d, ns=%d) on %pOF\n",
582 bus->name, na, ns, of_node_full_name(parent)); 582 bus->name, na, ns, parent);
583 of_dump_addr("translating address:", addr, na); 583 of_dump_addr("translating address:", addr, na);
584 584
585 /* Translate */ 585 /* Translate */
@@ -600,13 +600,12 @@ static u64 __of_translate_address(struct device_node *dev,
600 pbus = of_match_bus(parent); 600 pbus = of_match_bus(parent);
601 pbus->count_cells(dev, &pna, &pns); 601 pbus->count_cells(dev, &pna, &pns);
602 if (!OF_CHECK_COUNTS(pna, pns)) { 602 if (!OF_CHECK_COUNTS(pna, pns)) {
603 pr_err("Bad cell count for %s\n", 603 pr_err("Bad cell count for %pOF\n", dev);
604 of_node_full_name(dev));
605 break; 604 break;
606 } 605 }
607 606
608 pr_debug("parent bus is %s (na=%d, ns=%d) on %s\n", 607 pr_debug("parent bus is %s (na=%d, ns=%d) on %pOF\n",
609 pbus->name, pna, pns, of_node_full_name(parent)); 608 pbus->name, pna, pns, parent);
610 609
611 /* Apply bus translation */ 610 /* Apply bus translation */
612 if (of_translate_one(dev, bus, pbus, addr, na, ns, pna, rprop)) 611 if (of_translate_one(dev, bus, pbus, addr, na, ns, pna, rprop))
@@ -855,7 +854,7 @@ int of_dma_get_range(struct device_node *np, u64 *dma_addr, u64 *paddr, u64 *siz
855 } 854 }
856 855
857 if (!ranges) { 856 if (!ranges) {
858 pr_debug("no dma-ranges found for node(%s)\n", np->full_name); 857 pr_debug("no dma-ranges found for node(%pOF)\n", np);
859 ret = -ENODEV; 858 ret = -ENODEV;
860 goto out; 859 goto out;
861 } 860 }
@@ -872,8 +871,8 @@ int of_dma_get_range(struct device_node *np, u64 *dma_addr, u64 *paddr, u64 *siz
872 dmaaddr = of_read_number(ranges, naddr); 871 dmaaddr = of_read_number(ranges, naddr);
873 *paddr = of_translate_dma_address(np, ranges); 872 *paddr = of_translate_dma_address(np, ranges);
874 if (*paddr == OF_BAD_ADDR) { 873 if (*paddr == OF_BAD_ADDR) {
875 pr_err("translation of DMA address(%pad) to CPU address failed node(%s)\n", 874 pr_err("translation of DMA address(%pad) to CPU address failed node(%pOF)\n",
876 dma_addr, np->full_name); 875 dma_addr, np);
877 ret = -EINVAL; 876 ret = -EINVAL;
878 goto out; 877 goto out;
879 } 878 }
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 686628d1dfa6..5551ac2a9d4c 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -160,7 +160,7 @@ int __of_add_property_sysfs(struct device_node *np, struct property *pp)
160 pp->attr.read = of_node_property_read; 160 pp->attr.read = of_node_property_read;
161 161
162 rc = sysfs_create_bin_file(&np->kobj, &pp->attr); 162 rc = sysfs_create_bin_file(&np->kobj, &pp->attr);
163 WARN(rc, "error adding attribute %s to node %s\n", pp->name, np->full_name); 163 WARN(rc, "error adding attribute %s to node %pOF\n", pp->name, np);
164 return rc; 164 return rc;
165} 165}
166 166
@@ -1122,7 +1122,7 @@ EXPORT_SYMBOL(of_find_node_by_phandle);
1122void of_print_phandle_args(const char *msg, const struct of_phandle_args *args) 1122void of_print_phandle_args(const char *msg, const struct of_phandle_args *args)
1123{ 1123{
1124 int i; 1124 int i;
1125 printk("%s %s", msg, of_node_full_name(args->np)); 1125 printk("%s %pOF", msg, args->np);
1126 for (i = 0; i < args->args_count; i++) { 1126 for (i = 0; i < args->args_count; i++) {
1127 const char delim = i ? ',' : ':'; 1127 const char delim = i ? ',' : ':';
1128 1128
@@ -1184,17 +1184,17 @@ int of_phandle_iterator_next(struct of_phandle_iterator *it)
1184 1184
1185 if (it->cells_name) { 1185 if (it->cells_name) {
1186 if (!it->node) { 1186 if (!it->node) {
1187 pr_err("%s: could not find phandle\n", 1187 pr_err("%pOF: could not find phandle\n",
1188 it->parent->full_name); 1188 it->parent);
1189 goto err; 1189 goto err;
1190 } 1190 }
1191 1191
1192 if (of_property_read_u32(it->node, it->cells_name, 1192 if (of_property_read_u32(it->node, it->cells_name,
1193 &count)) { 1193 &count)) {
1194 pr_err("%s: could not get %s for %s\n", 1194 pr_err("%pOF: could not get %s for %pOF\n",
1195 it->parent->full_name, 1195 it->parent,
1196 it->cells_name, 1196 it->cells_name,
1197 it->node->full_name); 1197 it->node);
1198 goto err; 1198 goto err;
1199 } 1199 }
1200 } else { 1200 } else {
@@ -1206,8 +1206,8 @@ int of_phandle_iterator_next(struct of_phandle_iterator *it)
1206 * property data length 1206 * property data length
1207 */ 1207 */
1208 if (it->cur + count > it->list_end) { 1208 if (it->cur + count > it->list_end) {
1209 pr_err("%s: arguments longer than property\n", 1209 pr_err("%pOF: arguments longer than property\n",
1210 it->parent->full_name); 1210 it->parent);
1211 goto err; 1211 goto err;
1212 } 1212 }
1213 } 1213 }
@@ -1639,8 +1639,8 @@ static void of_alias_add(struct alias_prop *ap, struct device_node *np,
1639 strncpy(ap->stem, stem, stem_len); 1639 strncpy(ap->stem, stem, stem_len);
1640 ap->stem[stem_len] = 0; 1640 ap->stem[stem_len] = 0;
1641 list_add_tail(&ap->link, &aliases_lookup); 1641 list_add_tail(&ap->link, &aliases_lookup);
1642 pr_debug("adding DT alias:%s: stem=%s id=%i node=%s\n", 1642 pr_debug("adding DT alias:%s: stem=%s id=%i node=%pOF\n",
1643 ap->alias, ap->stem, ap->id, of_node_full_name(np)); 1643 ap->alias, ap->stem, ap->id, np);
1644} 1644}
1645 1645
1646/** 1646/**
diff --git a/drivers/of/device.c b/drivers/of/device.c
index 28c38c756f92..f9f31d66f64d 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -294,7 +294,7 @@ void of_device_uevent(struct device *dev, struct kobj_uevent_env *env)
294 return; 294 return;
295 295
296 add_uevent_var(env, "OF_NAME=%s", dev->of_node->name); 296 add_uevent_var(env, "OF_NAME=%s", dev->of_node->name);
297 add_uevent_var(env, "OF_FULLNAME=%s", dev->of_node->full_name); 297 add_uevent_var(env, "OF_FULLNAME=%pOF", dev->of_node);
298 if (dev->of_node->type && strcmp("<NULL>", dev->of_node->type) != 0) 298 if (dev->of_node->type && strcmp("<NULL>", dev->of_node->type) != 0)
299 add_uevent_var(env, "OF_TYPE=%s", dev->of_node->type); 299 add_uevent_var(env, "OF_TYPE=%s", dev->of_node->type);
300 300
diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c
index 0542cf8b6e3d..301b6db2b48d 100644
--- a/drivers/of/dynamic.c
+++ b/drivers/of/dynamic.c
@@ -98,14 +98,14 @@ int of_reconfig_notify(unsigned long action, struct of_reconfig_data *p)
98 switch (action) { 98 switch (action) {
99 case OF_RECONFIG_ATTACH_NODE: 99 case OF_RECONFIG_ATTACH_NODE:
100 case OF_RECONFIG_DETACH_NODE: 100 case OF_RECONFIG_DETACH_NODE:
101 pr_debug("notify %-15s %s\n", action_names[action], 101 pr_debug("notify %-15s %pOF\n", action_names[action],
102 pr->dn->full_name); 102 pr->dn);
103 break; 103 break;
104 case OF_RECONFIG_ADD_PROPERTY: 104 case OF_RECONFIG_ADD_PROPERTY:
105 case OF_RECONFIG_REMOVE_PROPERTY: 105 case OF_RECONFIG_REMOVE_PROPERTY:
106 case OF_RECONFIG_UPDATE_PROPERTY: 106 case OF_RECONFIG_UPDATE_PROPERTY:
107 pr_debug("notify %-15s %s:%s\n", action_names[action], 107 pr_debug("notify %-15s %pOF:%s\n", action_names[action],
108 pr->dn->full_name, pr->prop->name); 108 pr->dn, pr->prop->name);
109 break; 109 break;
110 110
111 } 111 }
@@ -328,11 +328,10 @@ void of_node_release(struct kobject *kobj)
328 328
329 /* We should never be releasing nodes that haven't been detached. */ 329 /* We should never be releasing nodes that haven't been detached. */
330 if (!of_node_check_flag(node, OF_DETACHED)) { 330 if (!of_node_check_flag(node, OF_DETACHED)) {
331 pr_err("ERROR: Bad of_node_put() on %s\n", node->full_name); 331 pr_err("ERROR: Bad of_node_put() on %pOF\n", node);
332 dump_stack(); 332 dump_stack();
333 return; 333 return;
334 } 334 }
335
336 if (!of_node_check_flag(node, OF_DYNAMIC)) 335 if (!of_node_check_flag(node, OF_DYNAMIC))
337 return; 336 return;
338 337
@@ -462,13 +461,13 @@ static void __of_changeset_entry_dump(struct of_changeset_entry *ce)
462 case OF_RECONFIG_ADD_PROPERTY: 461 case OF_RECONFIG_ADD_PROPERTY:
463 case OF_RECONFIG_REMOVE_PROPERTY: 462 case OF_RECONFIG_REMOVE_PROPERTY:
464 case OF_RECONFIG_UPDATE_PROPERTY: 463 case OF_RECONFIG_UPDATE_PROPERTY:
465 pr_debug("cset<%p> %-15s %s/%s\n", ce, action_names[ce->action], 464 pr_debug("cset<%p> %-15s %pOF/%s\n", ce, action_names[ce->action],
466 ce->np->full_name, ce->prop->name); 465 ce->np, ce->prop->name);
467 break; 466 break;
468 case OF_RECONFIG_ATTACH_NODE: 467 case OF_RECONFIG_ATTACH_NODE:
469 case OF_RECONFIG_DETACH_NODE: 468 case OF_RECONFIG_DETACH_NODE:
470 pr_debug("cset<%p> %-15s %s\n", ce, action_names[ce->action], 469 pr_debug("cset<%p> %-15s %pOF\n", ce, action_names[ce->action],
471 ce->np->full_name); 470 ce->np);
472 break; 471 break;
473 } 472 }
474} 473}
@@ -539,7 +538,7 @@ static void __of_changeset_entry_notify(struct of_changeset_entry *ce, bool reve
539 } 538 }
540 539
541 if (ret) 540 if (ret)
542 pr_err("changeset notifier error @%s\n", ce->np->full_name); 541 pr_err("changeset notifier error @%pOF\n", ce->np);
543} 542}
544 543
545static int __of_changeset_entry_apply(struct of_changeset_entry *ce) 544static int __of_changeset_entry_apply(struct of_changeset_entry *ce)
@@ -570,8 +569,8 @@ static int __of_changeset_entry_apply(struct of_changeset_entry *ce)
570 569
571 ret = __of_add_property(ce->np, ce->prop); 570 ret = __of_add_property(ce->np, ce->prop);
572 if (ret) { 571 if (ret) {
573 pr_err("changeset: add_property failed @%s/%s\n", 572 pr_err("changeset: add_property failed @%pOF/%s\n",
574 ce->np->full_name, 573 ce->np,
575 ce->prop->name); 574 ce->prop->name);
576 break; 575 break;
577 } 576 }
@@ -579,8 +578,8 @@ static int __of_changeset_entry_apply(struct of_changeset_entry *ce)
579 case OF_RECONFIG_REMOVE_PROPERTY: 578 case OF_RECONFIG_REMOVE_PROPERTY:
580 ret = __of_remove_property(ce->np, ce->prop); 579 ret = __of_remove_property(ce->np, ce->prop);
581 if (ret) { 580 if (ret) {
582 pr_err("changeset: remove_property failed @%s/%s\n", 581 pr_err("changeset: remove_property failed @%pOF/%s\n",
583 ce->np->full_name, 582 ce->np,
584 ce->prop->name); 583 ce->prop->name);
585 break; 584 break;
586 } 585 }
@@ -598,8 +597,8 @@ static int __of_changeset_entry_apply(struct of_changeset_entry *ce)
598 597
599 ret = __of_update_property(ce->np, ce->prop, &old_prop); 598 ret = __of_update_property(ce->np, ce->prop, &old_prop);
600 if (ret) { 599 if (ret) {
601 pr_err("changeset: update_property failed @%s/%s\n", 600 pr_err("changeset: update_property failed @%pOF/%s\n",
602 ce->np->full_name, 601 ce->np,
603 ce->prop->name); 602 ce->prop->name);
604 break; 603 break;
605 } 604 }
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 6ce72aa65425..9c4b32522bc2 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -131,7 +131,7 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
131 goto fail; 131 goto fail;
132 } 132 }
133 133
134 pr_debug("of_irq_parse_raw: ipar=%s, size=%d\n", of_node_full_name(ipar), intsize); 134 pr_debug("of_irq_parse_raw: ipar=%pOF, size=%d\n", ipar, intsize);
135 135
136 if (out_irq->args_count != intsize) 136 if (out_irq->args_count != intsize)
137 goto fail; 137 goto fail;
@@ -269,7 +269,7 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
269 skiplevel: 269 skiplevel:
270 /* Iterate again with new parent */ 270 /* Iterate again with new parent */
271 out_irq->np = newpar; 271 out_irq->np = newpar;
272 pr_debug(" -> new parent: %s\n", of_node_full_name(newpar)); 272 pr_debug(" -> new parent: %pOF\n", newpar);
273 of_node_put(ipar); 273 of_node_put(ipar);
274 ipar = newpar; 274 ipar = newpar;
275 newpar = NULL; 275 newpar = NULL;
@@ -301,7 +301,7 @@ int of_irq_parse_one(struct device_node *device, int index, struct of_phandle_ar
301 u32 intsize, intlen; 301 u32 intsize, intlen;
302 int i, res; 302 int i, res;
303 303
304 pr_debug("of_irq_parse_one: dev=%s, index=%d\n", of_node_full_name(device), index); 304 pr_debug("of_irq_parse_one: dev=%pOF, index=%d\n", device, index);
305 305
306 /* OldWorld mac stuff is "special", handle out of line */ 306 /* OldWorld mac stuff is "special", handle out of line */
307 if (of_irq_workarounds & OF_IMAP_OLDWORLD_MAC) 307 if (of_irq_workarounds & OF_IMAP_OLDWORLD_MAC)
@@ -555,8 +555,8 @@ void __init of_irq_init(const struct of_device_id *matches)
555 555
556 of_node_set_flag(desc->dev, OF_POPULATED); 556 of_node_set_flag(desc->dev, OF_POPULATED);
557 557
558 pr_debug("of_irq_init: init %s (%p), parent %p\n", 558 pr_debug("of_irq_init: init %pOF (%p), parent %p\n",
559 desc->dev->full_name, 559 desc->dev,
560 desc->dev, desc->interrupt_parent); 560 desc->dev, desc->interrupt_parent);
561 ret = desc->irq_init_cb(desc->dev, 561 ret = desc->irq_init_cb(desc->dev,
562 desc->interrupt_parent); 562 desc->interrupt_parent);
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index e0dbd6e48a98..754b9d6cd1cd 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -166,8 +166,8 @@ static bool of_mdiobus_child_is_phy(struct device_node *child)
166 166
167 if (of_match_node(whitelist_phys, child)) { 167 if (of_match_node(whitelist_phys, child)) {
168 pr_warn(FW_WARN 168 pr_warn(FW_WARN
169 "%s: Whitelisted compatible string. Please remove\n", 169 "%pOF: Whitelisted compatible string. Please remove\n",
170 child->full_name); 170 child);
171 return true; 171 return true;
172 } 172 }
173 173
diff --git a/drivers/of/of_pci.c b/drivers/of/of_pci.c
index c9d4d3a7b0fe..3d4cb7090878 100644
--- a/drivers/of/of_pci.c
+++ b/drivers/of/of_pci.c
@@ -204,15 +204,15 @@ int of_pci_get_host_bridge_resources(struct device_node *dev,
204 if (!bus_range) 204 if (!bus_range)
205 return -ENOMEM; 205 return -ENOMEM;
206 206
207 pr_info("host bridge %s ranges:\n", dev->full_name); 207 pr_info("host bridge %pOF ranges:\n", dev);
208 208
209 err = of_pci_parse_bus_range(dev, bus_range); 209 err = of_pci_parse_bus_range(dev, bus_range);
210 if (err) { 210 if (err) {
211 bus_range->start = busno; 211 bus_range->start = busno;
212 bus_range->end = bus_max; 212 bus_range->end = bus_max;
213 bus_range->flags = IORESOURCE_BUS; 213 bus_range->flags = IORESOURCE_BUS;
214 pr_info(" No bus range found for %s, using %pR\n", 214 pr_info(" No bus range found for %pOF, using %pR\n",
215 dev->full_name, bus_range); 215 dev, bus_range);
216 } else { 216 } else {
217 if (bus_range->end > bus_range->start + bus_max) 217 if (bus_range->end > bus_range->start + bus_max)
218 bus_range->end = bus_range->start + bus_max; 218 bus_range->end = bus_range->start + bus_max;
@@ -258,14 +258,14 @@ int of_pci_get_host_bridge_resources(struct device_node *dev,
258 258
259 if (resource_type(res) == IORESOURCE_IO) { 259 if (resource_type(res) == IORESOURCE_IO) {
260 if (!io_base) { 260 if (!io_base) {
261 pr_err("I/O range found for %s. Please provide an io_base pointer to save CPU base address\n", 261 pr_err("I/O range found for %pOF. Please provide an io_base pointer to save CPU base address\n",
262 dev->full_name); 262 dev);
263 err = -EINVAL; 263 err = -EINVAL;
264 goto conversion_failed; 264 goto conversion_failed;
265 } 265 }
266 if (*io_base != (resource_size_t)OF_BAD_ADDR) 266 if (*io_base != (resource_size_t)OF_BAD_ADDR)
267 pr_warn("More than one I/O resource converted for %s. CPU base address for old range lost!\n", 267 pr_warn("More than one I/O resource converted for %pOF. CPU base address for old range lost!\n",
268 dev->full_name); 268 dev);
269 *io_base = range.cpu_addr; 269 *io_base = range.cpu_addr;
270 } 270 }
271 271
@@ -325,7 +325,7 @@ int of_pci_map_rid(struct device_node *np, u32 rid,
325 } 325 }
326 326
327 if (!map_len || map_len % (4 * sizeof(*map))) { 327 if (!map_len || map_len % (4 * sizeof(*map))) {
328 pr_err("%s: Error: Bad %s length: %d\n", np->full_name, 328 pr_err("%pOF: Error: Bad %s length: %d\n", np,
329 map_name, map_len); 329 map_name, map_len);
330 return -EINVAL; 330 return -EINVAL;
331 } 331 }
@@ -349,8 +349,8 @@ int of_pci_map_rid(struct device_node *np, u32 rid,
349 u32 rid_len = be32_to_cpup(map + 3); 349 u32 rid_len = be32_to_cpup(map + 3);
350 350
351 if (rid_base & ~map_mask) { 351 if (rid_base & ~map_mask) {
352 pr_err("%s: Invalid %s translation - %s-mask (0x%x) ignores rid-base (0x%x)\n", 352 pr_err("%pOF: Invalid %s translation - %s-mask (0x%x) ignores rid-base (0x%x)\n",
353 np->full_name, map_name, map_name, 353 np, map_name, map_name,
354 map_mask, rid_base); 354 map_mask, rid_base);
355 return -EFAULT; 355 return -EFAULT;
356 } 356 }
@@ -375,14 +375,13 @@ int of_pci_map_rid(struct device_node *np, u32 rid,
375 if (id_out) 375 if (id_out)
376 *id_out = masked_rid - rid_base + out_base; 376 *id_out = masked_rid - rid_base + out_base;
377 377
378 pr_debug("%s: %s, using mask %08x, rid-base: %08x, out-base: %08x, length: %08x, rid: %08x -> %08x\n", 378 pr_debug("%pOF: %s, using mask %08x, rid-base: %08x, out-base: %08x, length: %08x, rid: %08x -> %08x\n",
379 np->full_name, map_name, map_mask, rid_base, out_base, 379 np, map_name, map_mask, rid_base, out_base,
380 rid_len, rid, *id_out); 380 rid_len, rid, *id_out);
381 return 0; 381 return 0;
382 } 382 }
383 383
384 pr_err("%s: Invalid %s translation - no match for rid 0x%x on %s\n", 384 pr_err("%pOF: Invalid %s translation - no match for rid 0x%x on %pOF\n",
385 np->full_name, map_name, rid, 385 np, map_name, rid, target && *target ? *target : NULL);
386 target && *target ? (*target)->full_name : "any target");
387 return -EFAULT; 386 return -EFAULT;
388} 387}
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index c0e4ee1cd1ba..0ddffebd7838 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -141,7 +141,7 @@ static int of_overlay_apply_single_device_node(struct of_overlay *ov,
141 of_node_put(tchild); 141 of_node_put(tchild);
142 } else { 142 } else {
143 /* create empty tree as a target */ 143 /* create empty tree as a target */
144 tchild = __of_node_dup(child, "%s/%s", target->full_name, cname); 144 tchild = __of_node_dup(child, "%pOF/%s", target, cname);
145 if (!tchild) 145 if (!tchild)
146 return -ENOMEM; 146 return -ENOMEM;
147 147
@@ -177,8 +177,8 @@ static int of_overlay_apply_one(struct of_overlay *ov,
177 for_each_property_of_node(overlay, prop) { 177 for_each_property_of_node(overlay, prop) {
178 ret = of_overlay_apply_single_property(ov, target, prop); 178 ret = of_overlay_apply_single_property(ov, target, prop);
179 if (ret) { 179 if (ret) {
180 pr_err("Failed to apply prop @%s/%s\n", 180 pr_err("Failed to apply prop @%pOF/%s\n",
181 target->full_name, prop->name); 181 target, prop->name);
182 return ret; 182 return ret;
183 } 183 }
184 } 184 }
@@ -186,8 +186,8 @@ static int of_overlay_apply_one(struct of_overlay *ov,
186 for_each_child_of_node(overlay, child) { 186 for_each_child_of_node(overlay, child) {
187 ret = of_overlay_apply_single_device_node(ov, target, child); 187 ret = of_overlay_apply_single_device_node(ov, target, child);
188 if (ret != 0) { 188 if (ret != 0) {
189 pr_err("Failed to apply single node @%s/%s\n", 189 pr_err("Failed to apply single node @%pOF/%s\n",
190 target->full_name, child->name); 190 target, child->name);
191 of_node_put(child); 191 of_node_put(child);
192 return ret; 192 return ret;
193 } 193 }
@@ -215,7 +215,7 @@ static int of_overlay_apply(struct of_overlay *ov)
215 215
216 err = of_overlay_apply_one(ov, ovinfo->target, ovinfo->overlay); 216 err = of_overlay_apply_one(ov, ovinfo->target, ovinfo->overlay);
217 if (err != 0) { 217 if (err != 0) {
218 pr_err("apply failed '%s'\n", ovinfo->target->full_name); 218 pr_err("apply failed '%pOF'\n", ovinfo->target);
219 return err; 219 return err;
220 } 220 }
221 } 221 }
@@ -400,8 +400,8 @@ int of_overlay_create(struct device_node *tree)
400 /* build the overlay info structures */ 400 /* build the overlay info structures */
401 err = of_build_overlay_info(ov, tree); 401 err = of_build_overlay_info(ov, tree);
402 if (err) { 402 if (err) {
403 pr_err("of_build_overlay_info() failed for tree@%s\n", 403 pr_err("of_build_overlay_info() failed for tree@%pOF\n",
404 tree->full_name); 404 tree);
405 goto err_free_idr; 405 goto err_free_idr;
406 } 406 }
407 407
@@ -480,9 +480,8 @@ static int overlay_is_topmost(struct of_overlay *ov, struct device_node *dn)
480 /* check against each subtree affected by this overlay */ 480 /* check against each subtree affected by this overlay */
481 list_for_each_entry(ce, &ovt->cset.entries, node) { 481 list_for_each_entry(ce, &ovt->cset.entries, node) {
482 if (overlay_subtree_check(ce->np, dn)) { 482 if (overlay_subtree_check(ce->np, dn)) {
483 pr_err("%s: #%d clashes #%d @%s\n", 483 pr_err("%s: #%d clashes #%d @%pOF\n",
484 __func__, ov->id, ovt->id, 484 __func__, ov->id, ovt->id, dn);
485 dn->full_name);
486 return 0; 485 return 0;
487 } 486 }
488 } 487 }
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index b19524623498..683b2e74bef7 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -228,7 +228,7 @@ static struct amba_device *of_amba_device_create(struct device_node *node,
228 const void *prop; 228 const void *prop;
229 int i, ret; 229 int i, ret;
230 230
231 pr_debug("Creating amba device %s\n", node->full_name); 231 pr_debug("Creating amba device %pOF\n", node);
232 232
233 if (!of_device_is_available(node) || 233 if (!of_device_is_available(node) ||
234 of_node_test_and_set_flag(node, OF_POPULATED)) 234 of_node_test_and_set_flag(node, OF_POPULATED))
@@ -259,15 +259,15 @@ static struct amba_device *of_amba_device_create(struct device_node *node,
259 259
260 ret = of_address_to_resource(node, 0, &dev->res); 260 ret = of_address_to_resource(node, 0, &dev->res);
261 if (ret) { 261 if (ret) {
262 pr_err("amba: of_address_to_resource() failed (%d) for %s\n", 262 pr_err("amba: of_address_to_resource() failed (%d) for %pOF\n",
263 ret, node->full_name); 263 ret, node);
264 goto err_free; 264 goto err_free;
265 } 265 }
266 266
267 ret = amba_device_add(dev, &iomem_resource); 267 ret = amba_device_add(dev, &iomem_resource);
268 if (ret) { 268 if (ret) {
269 pr_err("amba_device_add() failed (%d) for %s\n", 269 pr_err("amba_device_add() failed (%d) for %pOF\n",
270 ret, node->full_name); 270 ret, node);
271 goto err_free; 271 goto err_free;
272 } 272 }
273 273
@@ -310,7 +310,7 @@ static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *l
310 if (!of_address_to_resource(np, 0, &res)) 310 if (!of_address_to_resource(np, 0, &res))
311 if (res.start != auxdata->phys_addr) 311 if (res.start != auxdata->phys_addr)
312 continue; 312 continue;
313 pr_debug("%s: devname=%s\n", np->full_name, auxdata->name); 313 pr_debug("%pOF: devname=%s\n", np, auxdata->name);
314 return auxdata; 314 return auxdata;
315 } 315 }
316 316
@@ -323,7 +323,7 @@ static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *l
323 if (!of_device_is_compatible(np, auxdata->compatible)) 323 if (!of_device_is_compatible(np, auxdata->compatible))
324 continue; 324 continue;
325 if (!auxdata->phys_addr && !auxdata->name) { 325 if (!auxdata->phys_addr && !auxdata->name) {
326 pr_debug("%s: compatible match\n", np->full_name); 326 pr_debug("%pOF: compatible match\n", np);
327 return auxdata; 327 return auxdata;
328 } 328 }
329 } 329 }
@@ -356,14 +356,14 @@ static int of_platform_bus_create(struct device_node *bus,
356 356
357 /* Make sure it has a compatible property */ 357 /* Make sure it has a compatible property */
358 if (strict && (!of_get_property(bus, "compatible", NULL))) { 358 if (strict && (!of_get_property(bus, "compatible", NULL))) {
359 pr_debug("%s() - skipping %s, no compatible prop\n", 359 pr_debug("%s() - skipping %pOF, no compatible prop\n",
360 __func__, bus->full_name); 360 __func__, bus);
361 return 0; 361 return 0;
362 } 362 }
363 363
364 if (of_node_check_flag(bus, OF_POPULATED_BUS)) { 364 if (of_node_check_flag(bus, OF_POPULATED_BUS)) {
365 pr_debug("%s() - skipping %s, already populated\n", 365 pr_debug("%s() - skipping %pOF, already populated\n",
366 __func__, bus->full_name); 366 __func__, bus);
367 return 0; 367 return 0;
368 } 368 }
369 369
@@ -387,7 +387,7 @@ static int of_platform_bus_create(struct device_node *bus,
387 return 0; 387 return 0;
388 388
389 for_each_child_of_node(bus, child) { 389 for_each_child_of_node(bus, child) {
390 pr_debug(" create child: %s\n", child->full_name); 390 pr_debug(" create child: %pOF\n", child);
391 rc = of_platform_bus_create(child, matches, lookup, &dev->dev, strict); 391 rc = of_platform_bus_create(child, matches, lookup, &dev->dev, strict);
392 if (rc) { 392 if (rc) {
393 of_node_put(child); 393 of_node_put(child);
@@ -419,7 +419,7 @@ int of_platform_bus_probe(struct device_node *root,
419 return -EINVAL; 419 return -EINVAL;
420 420
421 pr_debug("%s()\n", __func__); 421 pr_debug("%s()\n", __func__);
422 pr_debug(" starting at: %s\n", root->full_name); 422 pr_debug(" starting at: %pOF\n", root);
423 423
424 /* Do a self check of bus type, if there's a match, create children */ 424 /* Do a self check of bus type, if there's a match, create children */
425 if (of_match_node(matches, root)) { 425 if (of_match_node(matches, root)) {
@@ -471,7 +471,7 @@ int of_platform_populate(struct device_node *root,
471 return -EINVAL; 471 return -EINVAL;
472 472
473 pr_debug("%s()\n", __func__); 473 pr_debug("%s()\n", __func__);
474 pr_debug(" starting at: %s\n", root->full_name); 474 pr_debug(" starting at: %pOF\n", root);
475 475
476 for_each_child_of_node(root, child) { 476 for_each_child_of_node(root, child) {
477 rc = of_platform_bus_create(child, matches, lookup, parent, true); 477 rc = of_platform_bus_create(child, matches, lookup, parent, true);
@@ -660,8 +660,8 @@ static int of_platform_notify(struct notifier_block *nb,
660 of_dev_put(pdev_parent); 660 of_dev_put(pdev_parent);
661 661
662 if (pdev == NULL) { 662 if (pdev == NULL) {
663 pr_err("%s: failed to create for '%s'\n", 663 pr_err("%s: failed to create for '%pOF'\n",
664 __func__, rd->dn->full_name); 664 __func__, rd->dn);
665 /* of_platform_device_create tosses the error code */ 665 /* of_platform_device_create tosses the error code */
666 return notifier_from_errno(-EINVAL); 666 return notifier_from_errno(-EINVAL);
667 } 667 }
diff --git a/drivers/of/property.c b/drivers/of/property.c
index eda50b4be934..ab4cf1da77b5 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -55,8 +55,8 @@ int of_property_count_elems_of_size(const struct device_node *np,
55 return -ENODATA; 55 return -ENODATA;
56 56
57 if (prop->length % elem_size != 0) { 57 if (prop->length % elem_size != 0) {
58 pr_err("size of %s in node %s is not a multiple of %d\n", 58 pr_err("size of %s in node %pOF is not a multiple of %d\n",
59 propname, np->full_name, elem_size); 59 propname, np, elem_size);
60 return -EINVAL; 60 return -EINVAL;
61 } 61 }
62 62
@@ -537,8 +537,8 @@ int of_graph_parse_endpoint(const struct device_node *node,
537{ 537{
538 struct device_node *port_node = of_get_parent(node); 538 struct device_node *port_node = of_get_parent(node);
539 539
540 WARN_ONCE(!port_node, "%s(): endpoint %s has no parent node\n", 540 WARN_ONCE(!port_node, "%s(): endpoint %pOF has no parent node\n",
541 __func__, node->full_name); 541 __func__, node);
542 542
543 memset(endpoint, 0, sizeof(*endpoint)); 543 memset(endpoint, 0, sizeof(*endpoint));
544 544
@@ -621,14 +621,13 @@ struct device_node *of_graph_get_next_endpoint(const struct device_node *parent,
621 of_node_put(node); 621 of_node_put(node);
622 622
623 if (!port) { 623 if (!port) {
624 pr_err("graph: no port node found in %s\n", 624 pr_err("graph: no port node found in %pOF\n", parent);
625 parent->full_name);
626 return NULL; 625 return NULL;
627 } 626 }
628 } else { 627 } else {
629 port = of_get_parent(prev); 628 port = of_get_parent(prev);
630 if (WARN_ONCE(!port, "%s(): endpoint %s has no parent node\n", 629 if (WARN_ONCE(!port, "%s(): endpoint %pOF has no parent node\n",
631 __func__, prev->full_name)) 630 __func__, prev))
632 return NULL; 631 return NULL;
633 } 632 }
634 633
@@ -784,8 +783,8 @@ struct device_node *of_graph_get_remote_node(const struct device_node *node,
784 783
785 endpoint_node = of_graph_get_endpoint_by_regs(node, port, endpoint); 784 endpoint_node = of_graph_get_endpoint_by_regs(node, port, endpoint);
786 if (!endpoint_node) { 785 if (!endpoint_node) {
787 pr_debug("no valid endpoint (%d, %d) for node %s\n", 786 pr_debug("no valid endpoint (%d, %d) for node %pOF\n",
788 port, endpoint, node->full_name); 787 port, endpoint, node);
789 return NULL; 788 return NULL;
790 } 789 }
791 790
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 0107fc680335..0959e8cc8814 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -46,46 +46,54 @@ static struct unittest_results {
46static void __init of_unittest_find_node_by_name(void) 46static void __init of_unittest_find_node_by_name(void)
47{ 47{
48 struct device_node *np; 48 struct device_node *np;
49 const char *options; 49 const char *options, *name;
50 50
51 np = of_find_node_by_path("/testcase-data"); 51 np = of_find_node_by_path("/testcase-data");
52 unittest(np && !strcmp("/testcase-data", np->full_name), 52 name = kasprintf(GFP_KERNEL, "%pOF", np);
53 unittest(np && !strcmp("/testcase-data", name),
53 "find /testcase-data failed\n"); 54 "find /testcase-data failed\n");
54 of_node_put(np); 55 of_node_put(np);
56 kfree(name);
55 57
56 /* Test if trailing '/' works */ 58 /* Test if trailing '/' works */
57 np = of_find_node_by_path("/testcase-data/"); 59 np = of_find_node_by_path("/testcase-data/");
58 unittest(!np, "trailing '/' on /testcase-data/ should fail\n"); 60 unittest(!np, "trailing '/' on /testcase-data/ should fail\n");
59 61
60 np = of_find_node_by_path("/testcase-data/phandle-tests/consumer-a"); 62 np = of_find_node_by_path("/testcase-data/phandle-tests/consumer-a");
61 unittest(np && !strcmp("/testcase-data/phandle-tests/consumer-a", np->full_name), 63 name = kasprintf(GFP_KERNEL, "%pOF", np);
64 unittest(np && !strcmp("/testcase-data/phandle-tests/consumer-a", name),
62 "find /testcase-data/phandle-tests/consumer-a failed\n"); 65 "find /testcase-data/phandle-tests/consumer-a failed\n");
63 of_node_put(np); 66 of_node_put(np);
67 kfree(name);
64 68
65 np = of_find_node_by_path("testcase-alias"); 69 np = of_find_node_by_path("testcase-alias");
66 unittest(np && !strcmp("/testcase-data", np->full_name), 70 name = kasprintf(GFP_KERNEL, "%pOF", np);
71 unittest(np && !strcmp("/testcase-data", name),
67 "find testcase-alias failed\n"); 72 "find testcase-alias failed\n");
68 of_node_put(np); 73 of_node_put(np);
74 kfree(name);
69 75
70 /* Test if trailing '/' works on aliases */ 76 /* Test if trailing '/' works on aliases */
71 np = of_find_node_by_path("testcase-alias/"); 77 np = of_find_node_by_path("testcase-alias/");
72 unittest(!np, "trailing '/' on testcase-alias/ should fail\n"); 78 unittest(!np, "trailing '/' on testcase-alias/ should fail\n");
73 79
74 np = of_find_node_by_path("testcase-alias/phandle-tests/consumer-a"); 80 np = of_find_node_by_path("testcase-alias/phandle-tests/consumer-a");
75 unittest(np && !strcmp("/testcase-data/phandle-tests/consumer-a", np->full_name), 81 name = kasprintf(GFP_KERNEL, "%pOF", np);
82 unittest(np && !strcmp("/testcase-data/phandle-tests/consumer-a", name),
76 "find testcase-alias/phandle-tests/consumer-a failed\n"); 83 "find testcase-alias/phandle-tests/consumer-a failed\n");
77 of_node_put(np); 84 of_node_put(np);
85 kfree(name);
78 86
79 np = of_find_node_by_path("/testcase-data/missing-path"); 87 np = of_find_node_by_path("/testcase-data/missing-path");
80 unittest(!np, "non-existent path returned node %s\n", np->full_name); 88 unittest(!np, "non-existent path returned node %pOF\n", np);
81 of_node_put(np); 89 of_node_put(np);
82 90
83 np = of_find_node_by_path("missing-alias"); 91 np = of_find_node_by_path("missing-alias");
84 unittest(!np, "non-existent alias returned node %s\n", np->full_name); 92 unittest(!np, "non-existent alias returned node %pOF\n", np);
85 of_node_put(np); 93 of_node_put(np);
86 94
87 np = of_find_node_by_path("testcase-alias/missing-path"); 95 np = of_find_node_by_path("testcase-alias/missing-path");
88 unittest(!np, "non-existent alias with relative path returned node %s\n", np->full_name); 96 unittest(!np, "non-existent alias with relative path returned node %pOF\n", np);
89 of_node_put(np); 97 of_node_put(np);
90 98
91 np = of_find_node_opts_by_path("/testcase-data:testoption", &options); 99 np = of_find_node_opts_by_path("/testcase-data:testoption", &options);
@@ -315,8 +323,8 @@ static void __init of_unittest_check_phandles(void)
315 323
316 hash_for_each_possible(phandle_ht, nh, node, np->phandle) { 324 hash_for_each_possible(phandle_ht, nh, node, np->phandle) {
317 if (nh->np->phandle == np->phandle) { 325 if (nh->np->phandle == np->phandle) {
318 pr_info("Duplicate phandle! %i used by %s and %s\n", 326 pr_info("Duplicate phandle! %i used by %pOF and %pOF\n",
319 np->phandle, nh->np->full_name, np->full_name); 327 np->phandle, nh->np, np);
320 dup_count++; 328 dup_count++;
321 break; 329 break;
322 } 330 }
@@ -406,8 +414,8 @@ static void __init of_unittest_parse_phandle_with_args(void)
406 passed = false; 414 passed = false;
407 } 415 }
408 416
409 unittest(passed, "index %i - data error on node %s rc=%i\n", 417 unittest(passed, "index %i - data error on node %pOF rc=%i\n",
410 i, args.np->full_name, rc); 418 i, args.np, rc);
411 } 419 }
412 420
413 /* Check for missing list property */ 421 /* Check for missing list property */
@@ -590,7 +598,7 @@ static void __init of_unittest_changeset(void)
590 598
591 /* Make sure node names are constructed correctly */ 599 /* Make sure node names are constructed correctly */
592 unittest((np = of_find_node_by_path("/testcase-data/changeset/n2/n21")), 600 unittest((np = of_find_node_by_path("/testcase-data/changeset/n2/n21")),
593 "'%s' not added\n", n21->full_name); 601 "'%pOF' not added\n", n21);
594 of_node_put(np); 602 of_node_put(np);
595 603
596 unittest(!of_changeset_revert(&chgset), "revert failed\n"); 604 unittest(!of_changeset_revert(&chgset), "revert failed\n");
@@ -621,8 +629,8 @@ static void __init of_unittest_parse_interrupts(void)
621 passed &= (args.args_count == 1); 629 passed &= (args.args_count == 1);
622 passed &= (args.args[0] == (i + 1)); 630 passed &= (args.args[0] == (i + 1));
623 631
624 unittest(passed, "index %i - data error on node %s rc=%i\n", 632 unittest(passed, "index %i - data error on node %pOF rc=%i\n",
625 i, args.np->full_name, rc); 633 i, args.np, rc);
626 } 634 }
627 of_node_put(np); 635 of_node_put(np);
628 636
@@ -667,8 +675,8 @@ static void __init of_unittest_parse_interrupts(void)
667 default: 675 default:
668 passed = false; 676 passed = false;
669 } 677 }
670 unittest(passed, "index %i - data error on node %s rc=%i\n", 678 unittest(passed, "index %i - data error on node %pOF rc=%i\n",
671 i, args.np->full_name, rc); 679 i, args.np, rc);
672 } 680 }
673 of_node_put(np); 681 of_node_put(np);
674} 682}
@@ -737,8 +745,8 @@ static void __init of_unittest_parse_interrupts_extended(void)
737 passed = false; 745 passed = false;
738 } 746 }
739 747
740 unittest(passed, "index %i - data error on node %s rc=%i\n", 748 unittest(passed, "index %i - data error on node %pOF rc=%i\n",
741 i, args.np->full_name, rc); 749 i, args.np, rc);
742 } 750 }
743 of_node_put(np); 751 of_node_put(np);
744} 752}
@@ -917,8 +925,11 @@ static int attach_node_and_children(struct device_node *np)
917{ 925{
918 struct device_node *next, *dup, *child; 926 struct device_node *next, *dup, *child;
919 unsigned long flags; 927 unsigned long flags;
928 const char *full_name;
920 929
921 dup = of_find_node_by_path(np->full_name); 930 full_name = kasprintf(GFP_KERNEL, "%pOF", np);
931 dup = of_find_node_by_path(full_name);
932 kfree(full_name);
922 if (dup) { 933 if (dup) {
923 update_node_properties(np, dup); 934 update_node_properties(np, dup);
924 return 0; 935 return 0;
@@ -1023,7 +1034,7 @@ static int unittest_probe(struct platform_device *pdev)
1023 1034
1024 } 1035 }
1025 1036
1026 dev_dbg(dev, "%s for node @%s\n", __func__, np->full_name); 1037 dev_dbg(dev, "%s for node @%pOF\n", __func__, np);
1027 1038
1028 of_platform_populate(np, NULL, NULL, &pdev->dev); 1039 of_platform_populate(np, NULL, NULL, &pdev->dev);
1029 1040
@@ -1035,7 +1046,7 @@ static int unittest_remove(struct platform_device *pdev)
1035 struct device *dev = &pdev->dev; 1046 struct device *dev = &pdev->dev;
1036 struct device_node *np = dev->of_node; 1047 struct device_node *np = dev->of_node;
1037 1048
1038 dev_dbg(dev, "%s for node @%s\n", __func__, np->full_name); 1049 dev_dbg(dev, "%s for node @%pOF\n", __func__, np);
1039 return 0; 1050 return 0;
1040} 1051}
1041 1052
@@ -1649,7 +1660,7 @@ static int unittest_i2c_bus_probe(struct platform_device *pdev)
1649 1660
1650 } 1661 }
1651 1662
1652 dev_dbg(dev, "%s for node @%s\n", __func__, np->full_name); 1663 dev_dbg(dev, "%s for node @%pOF\n", __func__, np);
1653 1664
1654 std = devm_kzalloc(dev, sizeof(*std), GFP_KERNEL); 1665 std = devm_kzalloc(dev, sizeof(*std), GFP_KERNEL);
1655 if (!std) { 1666 if (!std) {
@@ -1687,7 +1698,7 @@ static int unittest_i2c_bus_remove(struct platform_device *pdev)
1687 struct device_node *np = dev->of_node; 1698 struct device_node *np = dev->of_node;
1688 struct unittest_i2c_bus_data *std = platform_get_drvdata(pdev); 1699 struct unittest_i2c_bus_data *std = platform_get_drvdata(pdev);
1689 1700
1690 dev_dbg(dev, "%s for node @%s\n", __func__, np->full_name); 1701 dev_dbg(dev, "%s for node @%pOF\n", __func__, np);
1691 i2c_del_adapter(&std->adap); 1702 i2c_del_adapter(&std->adap);
1692 1703
1693 return 0; 1704 return 0;
@@ -1718,7 +1729,7 @@ static int unittest_i2c_dev_probe(struct i2c_client *client,
1718 return -EINVAL; 1729 return -EINVAL;
1719 } 1730 }
1720 1731
1721 dev_dbg(dev, "%s for node @%s\n", __func__, np->full_name); 1732 dev_dbg(dev, "%s for node @%pOF\n", __func__, np);
1722 1733
1723 return 0; 1734 return 0;
1724}; 1735};
@@ -1728,7 +1739,7 @@ static int unittest_i2c_dev_remove(struct i2c_client *client)
1728 struct device *dev = &client->dev; 1739 struct device *dev = &client->dev;
1729 struct device_node *np = client->dev.of_node; 1740 struct device_node *np = client->dev.of_node;
1730 1741
1731 dev_dbg(dev, "%s for node @%s\n", __func__, np->full_name); 1742 dev_dbg(dev, "%s for node @%pOF\n", __func__, np);
1732 return 0; 1743 return 0;
1733} 1744}
1734 1745
@@ -1763,7 +1774,7 @@ static int unittest_i2c_mux_probe(struct i2c_client *client,
1763 struct i2c_mux_core *muxc; 1774 struct i2c_mux_core *muxc;
1764 u32 reg, max_reg; 1775 u32 reg, max_reg;
1765 1776
1766 dev_dbg(dev, "%s for node @%s\n", __func__, np->full_name); 1777 dev_dbg(dev, "%s for node @%pOF\n", __func__, np);
1767 1778
1768 if (!np) { 1779 if (!np) {
1769 dev_err(dev, "No OF node\n"); 1780 dev_err(dev, "No OF node\n");
@@ -1808,7 +1819,7 @@ static int unittest_i2c_mux_remove(struct i2c_client *client)
1808 struct device_node *np = client->dev.of_node; 1819 struct device_node *np = client->dev.of_node;
1809 struct i2c_mux_core *muxc = i2c_get_clientdata(client); 1820 struct i2c_mux_core *muxc = i2c_get_clientdata(client);
1810 1821
1811 dev_dbg(dev, "%s for node @%s\n", __func__, np->full_name); 1822 dev_dbg(dev, "%s for node @%pOF\n", __func__, np);
1812 i2c_mux_del_adapters(muxc); 1823 i2c_mux_del_adapters(muxc);
1813 return 0; 1824 return 0;
1814} 1825}