]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
macintosh: Convert to using %pOF instead of full_name
authorRob Herring <robh@kernel.org>
Tue, 18 Jul 2017 21:43:12 +0000 (16:43 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 1 Sep 2017 06:42:52 +0000 (16:42 +1000)
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>
drivers/macintosh/macio_sysfs.c
drivers/macintosh/rack-meter.c
drivers/macintosh/smu.c
drivers/macintosh/via-cuda.c
drivers/macintosh/windfarm_fcu_controls.c
drivers/macintosh/windfarm_lm87_sensor.c
drivers/macintosh/windfarm_smu_sat.c

index 2445274f7e4bd1d21f0591e5db2d4f3ac3526a40..281f5345661ef3ac0595554a270ed1dd2c5aec7d 100644 (file)
@@ -52,7 +52,7 @@ static ssize_t devspec_show(struct device *dev,
        struct platform_device *ofdev;
 
        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(devspec);
index 35582eb271e9b1c4c55d20f5bbef160352f10833..910b5b6f96b1439a5843b8b08aa81b86e6ca5e9b 100644 (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 (macio_resource_count(mdev) < 2 || macio_irq_count(mdev) < 2) {
                printk(KERN_ERR
-                      "rackmeter: found match but lacks resources: %s"
+                      "rackmeter: found match but lacks resources: %pOF"
                       " (%d resources, %d interrupts)\n",
-                      mdev->ofdev.node->full_name);
+                      mdev->ofdev.dev.of_node);
                rc = -ENXIO;
                goto bail_free;
        }
        if (macio_request_resources(mdev, "rackmeter")) {
                printk(KERN_ERR
-                      "rackmeter: failed to request resources: %s\n",
-                      mdev->ofdev.node->full_name);
+                      "rackmeter: failed to request resources: %pOF\n",
+                      mdev->ofdev.dev.of_node);
                rc = -EBUSY;
                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, 1, &rdma)) {
                printk(KERN_ERR
-                      "rackmeter: found match but lacks resources: %s",
-                      mdev->ofdev.dev.of_node->full_name);
+                      "rackmeter: found match but lacks resources: %pOF",
+                      mdev->ofdev.dev.of_node);
                rc = -ENXIO;
                goto bail_free;
        }
index 1ac66421877a7a8a248f885fa220f3873b80e84b..ea9bdc85a21dedc4a62d1fe3845d7366452c4d13 100644 (file)
@@ -589,14 +589,14 @@ static int smu_late_init(void)
        if (smu->db_node) {
                smu->db_irq = irq_of_parse_and_map(smu->db_node, 0);
                if (!smu->db_irq)
-                       printk(KERN_ERR "smu: failed to map irq for node %s\n",
-                              smu->db_node->full_name);
+                       printk(KERN_ERR "smu: failed to map irq for node %pOF\n",
+                              smu->db_node);
        }
        if (smu->msg_node) {
                smu->msg_irq = irq_of_parse_and_map(smu->msg_node, 0);
                if (!smu->msg_irq)
-                       printk(KERN_ERR "smu: failed to map irq for node %s\n",
-                              smu->msg_node->full_name);
+                       printk(KERN_ERR "smu: failed to map irq for node %pOF\n",
+                              smu->msg_node);
        }
 
        /*
index c60415958dfee96b961d1539bb7f3935a91de936..147da4edd0213de5b04858466673e9a5adcb7a15 100644 (file)
@@ -297,8 +297,8 @@ static int __init via_cuda_start(void)
 #else
     cuda_irq = irq_of_parse_and_map(vias, 0);
     if (!cuda_irq) {
-       printk(KERN_ERR "via-cuda: can't map interrupts for %s\n",
-              vias->full_name);
+       printk(KERN_ERR "via-cuda: can't map interrupts for %pOF\n",
+              vias);
        return -ENODEV;
     }
 #endif
index 0226b796a21c9aa3f1ca2b28b02ca3b66fd6316b..fab7a21e95776f4d1074b877b710f31d551705ef 100644 (file)
@@ -470,8 +470,8 @@ static void wf_fcu_lookup_fans(struct wf_fcu_priv *pv)
                                id = ((*reg) - 0x30) / 2;
                        if (id > 7) {
                                pr_warning("wf_fcu: Can't parse "
-                                      "fan ID in device-tree for %s\n",
-                                          np->full_name);
+                                      "fan ID in device-tree for %pOF\n",
+                                          np);
                                break;
                        }
                        wf_fcu_add_fan(pv, name, type, id);
index c071aab79dd190d701dfaf8877a686c0793a19e3..913c4bfeef94ce6a9e26cdd4ea62f004a5999048 100644 (file)
@@ -126,8 +126,8 @@ static int wf_lm87_probe(struct i2c_client *client,
                }
        }
        if (!name) {
-               pr_warning("wf_lm87: Unsupported sensor %s\n",
-                          client->dev.of_node->full_name);
+               pr_warning("wf_lm87: Unsupported sensor %pOF\n",
+                          client->dev.of_node);
                return -ENODEV;
        }
 
index ad6223e8834043ba710c9d1bd5c41ae2a156dfbe..e9c828bf171bc4d4d9ff63250f337ed3787d185d 100644 (file)
@@ -248,7 +248,7 @@ static int wf_sat_probe(struct i2c_client *client,
                core = loc[5] - '0';
                if (chip > 1 || core > 1) {
                        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;
                }
                cpu = 2 * chip + core;