Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

macintosh: 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>
[mpe: Also convert the two cases inside #if 0]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Rob Herring and committed by
Michael Ellerman
b6a945ae 859420e3

+18 -18
+1 -1
drivers/macintosh/macio_sysfs.c
··· 52 52 struct platform_device *ofdev; 53 53 54 54 ofdev = to_platform_device(dev); 55 - return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name); 55 + return sprintf(buf, "%pOF\n", ofdev->dev.of_node); 56 56 } 57 57 static DEVICE_ATTR_RO(modalias); 58 58 static DEVICE_ATTR_RO(devspec);
+6 -6
drivers/macintosh/rack-meter.c
··· 411 411 #if 0 /* Use that when i2s-a is finally an mdev per-se */ 412 412 if (macio_resource_count(mdev) < 2 || macio_irq_count(mdev) < 2) { 413 413 printk(KERN_ERR 414 - "rackmeter: found match but lacks resources: %s" 414 + "rackmeter: found match but lacks resources: %pOF" 415 415 " (%d resources, %d interrupts)\n", 416 - mdev->ofdev.node->full_name); 416 + mdev->ofdev.dev.of_node); 417 417 rc = -ENXIO; 418 418 goto bail_free; 419 419 } 420 420 if (macio_request_resources(mdev, "rackmeter")) { 421 421 printk(KERN_ERR 422 - "rackmeter: failed to request resources: %s\n", 423 - mdev->ofdev.node->full_name); 422 + "rackmeter: failed to request resources: %pOF\n", 423 + mdev->ofdev.dev.of_node); 424 424 rc = -EBUSY; 425 425 goto bail_free; 426 426 } ··· 431 431 of_address_to_resource(i2s, 0, &ri2s) || 432 432 of_address_to_resource(i2s, 1, &rdma)) { 433 433 printk(KERN_ERR 434 - "rackmeter: found match but lacks resources: %s", 435 - mdev->ofdev.dev.of_node->full_name); 434 + "rackmeter: found match but lacks resources: %pOF", 435 + mdev->ofdev.dev.of_node); 436 436 rc = -ENXIO; 437 437 goto bail_free; 438 438 }
+4 -4
drivers/macintosh/smu.c
··· 589 589 if (smu->db_node) { 590 590 smu->db_irq = irq_of_parse_and_map(smu->db_node, 0); 591 591 if (!smu->db_irq) 592 - printk(KERN_ERR "smu: failed to map irq for node %s\n", 593 - smu->db_node->full_name); 592 + printk(KERN_ERR "smu: failed to map irq for node %pOF\n", 593 + smu->db_node); 594 594 } 595 595 if (smu->msg_node) { 596 596 smu->msg_irq = irq_of_parse_and_map(smu->msg_node, 0); 597 597 if (!smu->msg_irq) 598 - printk(KERN_ERR "smu: failed to map irq for node %s\n", 599 - smu->msg_node->full_name); 598 + printk(KERN_ERR "smu: failed to map irq for node %pOF\n", 599 + smu->msg_node); 600 600 } 601 601 602 602 /*
+2 -2
drivers/macintosh/via-cuda.c
··· 297 297 #else 298 298 cuda_irq = irq_of_parse_and_map(vias, 0); 299 299 if (!cuda_irq) { 300 - printk(KERN_ERR "via-cuda: can't map interrupts for %s\n", 301 - vias->full_name); 300 + printk(KERN_ERR "via-cuda: can't map interrupts for %pOF\n", 301 + vias); 302 302 return -ENODEV; 303 303 } 304 304 #endif
+2 -2
drivers/macintosh/windfarm_fcu_controls.c
··· 470 470 id = ((*reg) - 0x30) / 2; 471 471 if (id > 7) { 472 472 pr_warning("wf_fcu: Can't parse " 473 - "fan ID in device-tree for %s\n", 474 - np->full_name); 473 + "fan ID in device-tree for %pOF\n", 474 + np); 475 475 break; 476 476 } 477 477 wf_fcu_add_fan(pv, name, type, id);
+2 -2
drivers/macintosh/windfarm_lm87_sensor.c
··· 126 126 } 127 127 } 128 128 if (!name) { 129 - pr_warning("wf_lm87: Unsupported sensor %s\n", 130 - client->dev.of_node->full_name); 129 + pr_warning("wf_lm87: Unsupported sensor %pOF\n", 130 + client->dev.of_node); 131 131 return -ENODEV; 132 132 } 133 133
+1 -1
drivers/macintosh/windfarm_smu_sat.c
··· 248 248 core = loc[5] - '0'; 249 249 if (chip > 1 || core > 1) { 250 250 printk(KERN_ERR "wf_sat_create: don't understand " 251 - "location %s for %s\n", loc, child->full_name); 251 + "location %s for %pOF\n", loc, child); 252 252 continue; 253 253 } 254 254 cpu = 2 * chip + core;