MIPS: Convert to using %pOF instead of full_name
authorRob Herring <robh@kernel.org>
Tue, 18 Jul 2017 21:42:45 +0000 (16:42 -0500)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 29 Aug 2017 13:21:50 +0000 (15:21 +0200)
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>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/16783/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/ath79/clock.c
arch/mips/pci/pci-legacy.c
arch/mips/pci/pci-rt3883.c

index fa845953f736f87af7f62100a0b4ac149b3f331b..6b1000b6a6a6717a2e18032a644feef99666a9b4 100644 (file)
@@ -487,17 +487,16 @@ static void __init ath79_clocks_init_dt_ng(struct device_node *np)
 {
        struct clk *ref_clk;
        void __iomem *pll_base;
-       const char *dnfn = of_node_full_name(np);
 
        ref_clk = of_clk_get(np, 0);
        if (IS_ERR(ref_clk)) {
-               pr_err("%s: of_clk_get failed\n", dnfn);
+               pr_err("%pOF: of_clk_get failed\n", np);
                goto err;
        }
 
        pll_base = of_iomap(np, 0);
        if (!pll_base) {
-               pr_err("%s: can't map pll registers\n", dnfn);
+               pr_err("%pOF: can't map pll registers\n", np);
                goto err_clk;
        }
 
@@ -506,12 +505,12 @@ static void __init ath79_clocks_init_dt_ng(struct device_node *np)
        else if (of_device_is_compatible(np, "qca,ar9330-pll"))
                ar9330_clk_init(ref_clk, pll_base);
        else {
-               pr_err("%s: could not find any appropriate clk_init()\n", dnfn);
+               pr_err("%pOF: could not find any appropriate clk_init()\n", np);
                goto err_iounmap;
        }
 
        if (of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data)) {
-               pr_err("%s: could not register clk provider\n", dnfn);
+               pr_err("%pOF: could not register clk provider\n", np);
                goto err_iounmap;
        }
 
index 174575a9a112dcb73634e31b21040df3ad6ad470..958f47c1f55830ec1c7b506e5b60324b550ca385 100644 (file)
@@ -127,7 +127,7 @@ void pci_load_of_ranges(struct pci_controller *hose, struct device_node *node)
        struct of_pci_range range;
        struct of_pci_range_parser parser;
 
-       pr_info("PCI host bridge %s ranges:\n", node->full_name);
+       pr_info("PCI host bridge %pOF ranges:\n", node);
        hose->of_node = node;
 
        if (of_pci_range_parser_init(&parser, node))
index 3520e9b414e7b91dfedc59abeb37d757579e475a..04f8ea953297ff96dfef3fedebc031075c31251d 100644 (file)
@@ -207,8 +207,7 @@ static int rt3883_pci_irq_init(struct device *dev,
 
        irq = irq_of_parse_and_map(rpc->intc_of_node, 0);
        if (irq == 0) {
-               dev_err(dev, "%s has no IRQ",
-                       of_node_full_name(rpc->intc_of_node));
+               dev_err(dev, "%pOF has no IRQ", rpc->intc_of_node);
                return -EINVAL;
        }
 
@@ -438,8 +437,8 @@ static int rt3883_pci_probe(struct platform_device *pdev)
        }
 
        if (!rpc->intc_of_node) {
-               dev_err(dev, "%s has no %s child node",
-                       of_node_full_name(rpc->intc_of_node),
+               dev_err(dev, "%pOF has no %s child node",
+                       rpc->intc_of_node,
                        "interrupt controller");
                return -EINVAL;
        }
@@ -454,8 +453,8 @@ static int rt3883_pci_probe(struct platform_device *pdev)
        }
 
        if (!rpc->pci_controller.of_node) {
-               dev_err(dev, "%s has no %s child node",
-                       of_node_full_name(rpc->intc_of_node),
+               dev_err(dev, "%pOF has no %s child node",
+                       rpc->intc_of_node,
                        "PCI host bridge");
                err = -EINVAL;
                goto err_put_intc_node;