1
0
Fork 0

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>
This commit is contained in:
Rob Herring 2017-07-18 16:43:12 -05:00 committed by Michael Ellerman
parent 859420e315
commit b6a945ae03
7 changed files with 18 additions and 18 deletions

View file

@ -52,7 +52,7 @@ static ssize_t devspec_show(struct device *dev,
struct platform_device *ofdev; struct platform_device *ofdev;
ofdev = to_platform_device(dev); ofdev = to_platform_device(dev);
return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name); return sprintf(buf, "%pOF\n", ofdev->dev.of_node);
} }
static DEVICE_ATTR_RO(modalias); static DEVICE_ATTR_RO(modalias);
static DEVICE_ATTR_RO(devspec); static DEVICE_ATTR_RO(devspec);

View file

@ -411,16 +411,16 @@ static int rackmeter_probe(struct macio_dev* mdev,
#if 0 /* Use that when i2s-a is finally an mdev per-se */ #if 0 /* Use that when i2s-a is finally an mdev per-se */
if (macio_resource_count(mdev) < 2 || macio_irq_count(mdev) < 2) { if (macio_resource_count(mdev) < 2 || macio_irq_count(mdev) < 2) {
printk(KERN_ERR printk(KERN_ERR
"rackmeter: found match but lacks resources: %s" "rackmeter: found match but lacks resources: %pOF"
" (%d resources, %d interrupts)\n", " (%d resources, %d interrupts)\n",
mdev->ofdev.node->full_name); mdev->ofdev.dev.of_node);
rc = -ENXIO; rc = -ENXIO;
goto bail_free; goto bail_free;
} }
if (macio_request_resources(mdev, "rackmeter")) { if (macio_request_resources(mdev, "rackmeter")) {
printk(KERN_ERR printk(KERN_ERR
"rackmeter: failed to request resources: %s\n", "rackmeter: failed to request resources: %pOF\n",
mdev->ofdev.node->full_name); mdev->ofdev.dev.of_node);
rc = -EBUSY; rc = -EBUSY;
goto bail_free; goto bail_free;
} }
@ -431,8 +431,8 @@ static int rackmeter_probe(struct macio_dev* mdev,
of_address_to_resource(i2s, 0, &ri2s) || of_address_to_resource(i2s, 0, &ri2s) ||
of_address_to_resource(i2s, 1, &rdma)) { of_address_to_resource(i2s, 1, &rdma)) {
printk(KERN_ERR printk(KERN_ERR
"rackmeter: found match but lacks resources: %s", "rackmeter: found match but lacks resources: %pOF",
mdev->ofdev.dev.of_node->full_name); mdev->ofdev.dev.of_node);
rc = -ENXIO; rc = -ENXIO;
goto bail_free; goto bail_free;
} }

View file

@ -589,14 +589,14 @@ static int smu_late_init(void)
if (smu->db_node) { if (smu->db_node) {
smu->db_irq = irq_of_parse_and_map(smu->db_node, 0); smu->db_irq = irq_of_parse_and_map(smu->db_node, 0);
if (!smu->db_irq) if (!smu->db_irq)
printk(KERN_ERR "smu: failed to map irq for node %s\n", printk(KERN_ERR "smu: failed to map irq for node %pOF\n",
smu->db_node->full_name); smu->db_node);
} }
if (smu->msg_node) { if (smu->msg_node) {
smu->msg_irq = irq_of_parse_and_map(smu->msg_node, 0); smu->msg_irq = irq_of_parse_and_map(smu->msg_node, 0);
if (!smu->msg_irq) if (!smu->msg_irq)
printk(KERN_ERR "smu: failed to map irq for node %s\n", printk(KERN_ERR "smu: failed to map irq for node %pOF\n",
smu->msg_node->full_name); smu->msg_node);
} }
/* /*

View file

@ -297,8 +297,8 @@ static int __init via_cuda_start(void)
#else #else
cuda_irq = irq_of_parse_and_map(vias, 0); cuda_irq = irq_of_parse_and_map(vias, 0);
if (!cuda_irq) { if (!cuda_irq) {
printk(KERN_ERR "via-cuda: can't map interrupts for %s\n", printk(KERN_ERR "via-cuda: can't map interrupts for %pOF\n",
vias->full_name); vias);
return -ENODEV; return -ENODEV;
} }
#endif #endif

View file

@ -470,8 +470,8 @@ static void wf_fcu_lookup_fans(struct wf_fcu_priv *pv)
id = ((*reg) - 0x30) / 2; id = ((*reg) - 0x30) / 2;
if (id > 7) { if (id > 7) {
pr_warning("wf_fcu: Can't parse " pr_warning("wf_fcu: Can't parse "
"fan ID in device-tree for %s\n", "fan ID in device-tree for %pOF\n",
np->full_name); np);
break; break;
} }
wf_fcu_add_fan(pv, name, type, id); wf_fcu_add_fan(pv, name, type, id);

View file

@ -126,8 +126,8 @@ static int wf_lm87_probe(struct i2c_client *client,
} }
} }
if (!name) { if (!name) {
pr_warning("wf_lm87: Unsupported sensor %s\n", pr_warning("wf_lm87: Unsupported sensor %pOF\n",
client->dev.of_node->full_name); client->dev.of_node);
return -ENODEV; return -ENODEV;
} }

View file

@ -248,7 +248,7 @@ static int wf_sat_probe(struct i2c_client *client,
core = loc[5] - '0'; core = loc[5] - '0';
if (chip > 1 || core > 1) { if (chip > 1 || core > 1) {
printk(KERN_ERR "wf_sat_create: don't understand " printk(KERN_ERR "wf_sat_create: don't understand "
"location %s for %s\n", loc, child->full_name); "location %s for %pOF\n", loc, child);
continue; continue;
} }
cpu = 2 * chip + core; cpu = 2 * chip + core;