irqchip: Convert to using %pOF instead of full_name
authorRob Herring <robh@kernel.org>
Tue, 18 Jul 2017 21:43:10 +0000 (16:43 -0500)
committerMarc Zyngier <marc.zyngier@arm.com>
Wed, 23 Aug 2017 09:09:28 +0000 (10:09 +0100)
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.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Lee Jones <lee@kernel.org>
Cc: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: Sylvain Lemieux <slemieux.tyco@gmail.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-tegra@vger.kernel.org
Acked-by: Eric Anholt <eric@anholt.net>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Alexandre Torgue <alexandre.torgue@st.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
16 files changed:
drivers/irqchip/irq-bcm2835.c
drivers/irqchip/irq-bcm2836.c
drivers/irqchip/irq-crossbar.c
drivers/irqchip/irq-digicolor.c
drivers/irqchip/irq-dw-apb-ictl.c
drivers/irqchip/irq-gic-v3-its-pci-msi.c
drivers/irqchip/irq-gic-v3-its.c
drivers/irqchip/irq-gic-v3.c
drivers/irqchip/irq-imx-gpcv2.c
drivers/irqchip/irq-lpc32xx.c
drivers/irqchip/irq-mtk-sysirq.c
drivers/irqchip/irq-mxs.c
drivers/irqchip/irq-stm32-exti.c
drivers/irqchip/irq-sun4i.c
drivers/irqchip/irq-tegra.c
drivers/irqchip/irq-xilinx-intc.c

index 44d7c38dde479d771f3552e914bf8c1c1f5019f7..d2da8a1e6b1b71381e382d034e7a94e865a6c3da 100644 (file)
@@ -147,13 +147,12 @@ static int __init armctrl_of_init(struct device_node *node,
 
        base = of_iomap(node, 0);
        if (!base)
-               panic("%s: unable to map IC registers\n",
-                       node->full_name);
+               panic("%pOF: unable to map IC registers\n", node);
 
        intc.domain = irq_domain_add_linear(node, MAKE_HWIRQ(NR_BANKS, 0),
                        &armctrl_ops, NULL);
        if (!intc.domain)
-               panic("%s: unable to create IRQ domain\n", node->full_name);
+               panic("%pOF: unable to create IRQ domain\n", node);
 
        for (b = 0; b < NR_BANKS; b++) {
                intc.pending[b] = base + reg_pending[b];
@@ -173,8 +172,8 @@ static int __init armctrl_of_init(struct device_node *node,
                int parent_irq = irq_of_parse_and_map(node, 0);
 
                if (!parent_irq) {
-                       panic("%s: unable to get parent interrupt.\n",
-                             node->full_name);
+                       panic("%pOF: unable to get parent interrupt.\n",
+                             node);
                }
                irq_set_chained_handler(parent_irq, bcm2836_chained_handle_irq);
        } else {
index e7463e3c08143acae3e8cc5682f918c6a0b07ebd..dc8c1e3eafe794a3af83dd987a6d6362d14dd5ee 100644 (file)
@@ -282,8 +282,7 @@ static int __init bcm2836_arm_irqchip_l1_intc_of_init(struct device_node *node,
 {
        intc.base = of_iomap(node, 0);
        if (!intc.base) {
-               panic("%s: unable to map local interrupt registers\n",
-                       node->full_name);
+               panic("%pOF: unable to map local interrupt registers\n", node);
        }
 
        bcm2835_init_local_timer_frequency();
@@ -292,7 +291,7 @@ static int __init bcm2836_arm_irqchip_l1_intc_of_init(struct device_node *node,
                                            &bcm2836_arm_irqchip_intc_ops,
                                            NULL);
        if (!intc.domain)
-               panic("%s: unable to create IRQ domain\n", node->full_name);
+               panic("%pOF: unable to create IRQ domain\n", node);
 
        bcm2836_arm_irqchip_register_irq(LOCAL_IRQ_CNTPSIRQ,
                                         &bcm2836_arm_irqchip_timer);
index f96601268f7194bb5aada8f0f07327f2871d1c76..99d97d7e3fd779ac051f48fb3ee62cc9e0d3aec8 100644 (file)
@@ -341,13 +341,13 @@ static int __init irqcrossbar_init(struct device_node *node,
        int err;
 
        if (!parent) {
-               pr_err("%s: no parent, giving up\n", node->full_name);
+               pr_err("%pOF: no parent, giving up\n", node);
                return -ENODEV;
        }
 
        parent_domain = irq_find_host(parent);
        if (!parent_domain) {
-               pr_err("%s: unable to obtain parent domain\n", node->full_name);
+               pr_err("%pOF: unable to obtain parent domain\n", node);
                return -ENXIO;
        }
 
@@ -360,7 +360,7 @@ static int __init irqcrossbar_init(struct device_node *node,
                                          node, &crossbar_domain_ops,
                                          NULL);
        if (!domain) {
-               pr_err("%s: failed to allocated domain\n", node->full_name);
+               pr_err("%pOF: failed to allocated domain\n", node);
                return -ENOMEM;
        }
 
index 3aae015469a5189a2592087fc40f27767c754316..fc38d2da11b93f7cc9c6830c88b0bbad671f1b7c 100644 (file)
@@ -78,7 +78,7 @@ static int __init digicolor_of_init(struct device_node *node,
 
        reg_base = of_iomap(node, 0);
        if (!reg_base) {
-               pr_err("%s: unable to map IC registers\n", node->full_name);
+               pr_err("%pOF: unable to map IC registers\n", node);
                return -ENXIO;
        }
 
@@ -88,7 +88,7 @@ static int __init digicolor_of_init(struct device_node *node,
 
        ucregs = syscon_regmap_lookup_by_phandle(node, "syscon");
        if (IS_ERR(ucregs)) {
-               pr_err("%s: unable to map UC registers\n", node->full_name);
+               pr_err("%pOF: unable to map UC registers\n", node);
                return PTR_ERR(ucregs);
        }
        /* channel 1, regular IRQs */
@@ -97,7 +97,7 @@ static int __init digicolor_of_init(struct device_node *node,
        digicolor_irq_domain =
                irq_domain_add_linear(node, 64, &irq_generic_chip_ops, NULL);
        if (!digicolor_irq_domain) {
-               pr_err("%s: unable to create IRQ domain\n", node->full_name);
+               pr_err("%pOF: unable to create IRQ domain\n", node);
                return -ENOMEM;
        }
 
@@ -105,7 +105,7 @@ static int __init digicolor_of_init(struct device_node *node,
                                             "digicolor_irq", handle_level_irq,
                                             clr, 0, 0);
        if (ret) {
-               pr_err("%s: unable to allocate IRQ gc\n", node->full_name);
+               pr_err("%pOF: unable to allocate IRQ gc\n", node);
                return ret;
        }
 
index 052f266364c0cd1a3af91511a0eb87f11d8b43ec..0a19618ce2c8bc89e52264b9122072281c8bdeb4 100644 (file)
@@ -79,24 +79,24 @@ static int __init dw_apb_ictl_init(struct device_node *np,
        /* Map the parent interrupt for the chained handler */
        irq = irq_of_parse_and_map(np, 0);
        if (irq <= 0) {
-               pr_err("%s: unable to parse irq\n", np->full_name);
+               pr_err("%pOF: unable to parse irq\n", np);
                return -EINVAL;
        }
 
        ret = of_address_to_resource(np, 0, &r);
        if (ret) {
-               pr_err("%s: unable to get resource\n", np->full_name);
+               pr_err("%pOF: unable to get resource\n", np);
                return ret;
        }
 
        if (!request_mem_region(r.start, resource_size(&r), np->full_name)) {
-               pr_err("%s: unable to request mem region\n", np->full_name);
+               pr_err("%pOF: unable to request mem region\n", np);
                return -ENOMEM;
        }
 
        iobase = ioremap(r.start, resource_size(&r));
        if (!iobase) {
-               pr_err("%s: unable to map resource\n", np->full_name);
+               pr_err("%pOF: unable to map resource\n", np);
                ret = -ENOMEM;
                goto err_release;
        }
@@ -123,7 +123,7 @@ static int __init dw_apb_ictl_init(struct device_node *np,
        domain = irq_domain_add_linear(np, nrirqs,
                                       &irq_generic_chip_ops, NULL);
        if (!domain) {
-               pr_err("%s: unable to add irq domain\n", np->full_name);
+               pr_err("%pOF: unable to add irq domain\n", np);
                ret = -ENOMEM;
                goto err_unmap;
        }
@@ -132,7 +132,7 @@ static int __init dw_apb_ictl_init(struct device_node *np,
                                             handle_level_irq, clr, 0,
                                             IRQ_GC_INIT_MASK_CACHE);
        if (ret) {
-               pr_err("%s: unable to alloc irq domain gc\n", np->full_name);
+               pr_err("%pOF: unable to alloc irq domain gc\n", np);
                goto err_unmap;
        }
 
index 77931214d954ddd35d3ab05e4079275cb00e688c..14a8c0a7e095eb32c383bccbb163174ce1ccec28 100644 (file)
@@ -138,7 +138,7 @@ static int __init its_pci_of_msi_init(void)
                if (its_pci_msi_init_one(of_node_to_fwnode(np), np->full_name))
                        continue;
 
-               pr_info("PCI/MSI: %s domain created\n", np->full_name);
+               pr_info("PCI/MSI: %pOF domain created\n", np);
        }
 
        return 0;
index 350a959da6dd59e13e06f4c5cf23a634386d0150..b93bd5a91e92f7b51713641a651efe4608580b1f 100644 (file)
@@ -1822,13 +1822,13 @@ static int __init its_of_probe(struct device_node *node)
        for (np = of_find_matching_node(node, its_device_id); np;
             np = of_find_matching_node(np, its_device_id)) {
                if (!of_property_read_bool(np, "msi-controller")) {
-                       pr_warn("%s: no msi-controller property, ITS ignored\n",
-                               np->full_name);
+                       pr_warn("%pOF: no msi-controller property, ITS ignored\n",
+                               np);
                        continue;
                }
 
                if (of_address_to_resource(np, 0, &res)) {
-                       pr_warn("%s: no regs?\n", np->full_name);
+                       pr_warn("%pOF: no regs?\n", np);
                        continue;
                }
 
index dbffb7ab62033b346ca7fc3b3468d6bcb3a19a63..afae0a9d0df9b6c217fe474122a199bdcae18f95 100644 (file)
@@ -1057,7 +1057,7 @@ static void __init gic_populate_ppi_partitions(struct device_node *gic_node)
                        if (WARN_ON(cpu == -1))
                                continue;
 
-                       pr_cont("%s[%d] ", cpu_node->full_name, cpu);
+                       pr_cont("%pOF[%d] ", cpu_node, cpu);
 
                        cpumask_set_cpu(cpu, &part->mask);
                }
@@ -1125,15 +1125,13 @@ static int __init gic_of_init(struct device_node *node, struct device_node *pare
 
        dist_base = of_iomap(node, 0);
        if (!dist_base) {
-               pr_err("%s: unable to map gic dist registers\n",
-                       node->full_name);
+               pr_err("%pOF: unable to map gic dist registers\n", node);
                return -ENXIO;
        }
 
        err = gic_validate_dist_version(dist_base);
        if (err) {
-               pr_err("%s: no distributor detected, giving up\n",
-                       node->full_name);
+               pr_err("%pOF: no distributor detected, giving up\n", node);
                goto out_unmap_dist;
        }
 
@@ -1153,8 +1151,7 @@ static int __init gic_of_init(struct device_node *node, struct device_node *pare
                ret = of_address_to_resource(node, 1 + i, &res);
                rdist_regs[i].redist_base = of_iomap(node, 1 + i);
                if (ret || !rdist_regs[i].redist_base) {
-                       pr_err("%s: couldn't map region %d\n",
-                              node->full_name, i);
+                       pr_err("%pOF: couldn't map region %d\n", node, i);
                        err = -ENODEV;
                        goto out_unmap_rdist;
                }
index bb36f572e3223f61f4c62d5f2c1b39223d551f07..675eda5ff2b85f6037eaea58d49a3d48a9e2c33d 100644 (file)
@@ -214,13 +214,13 @@ static int __init imx_gpcv2_irqchip_init(struct device_node *node,
        int i;
 
        if (!parent) {
-               pr_err("%s: no parent, giving up\n", node->full_name);
+               pr_err("%pOF: no parent, giving up\n", node);
                return -ENODEV;
        }
 
        parent_domain = irq_find_host(parent);
        if (!parent_domain) {
-               pr_err("%s: unable to get parent domain\n", node->full_name);
+               pr_err("%pOF: unable to get parent domain\n", node);
                return -ENXIO;
        }
 
index 1034aeb2e98ace08fd1f072f5e2011a56cd443ce..a48357d369b502ca4e99faaf889b7900ff19eb9e 100644 (file)
@@ -191,7 +191,7 @@ static int __init lpc32xx_of_ic_init(struct device_node *node,
 
        irqc->base = of_iomap(node, 0);
        if (!irqc->base) {
-               pr_err("%s: unable to map registers\n", node->full_name);
+               pr_err("%pOF: unable to map registers\n", node);
                kfree(irqc);
                return -EINVAL;
        }
index eeac512ec5a88b93aa84af055963b1ebabb6b789..90aaf190157f774f3d5c7e6968e5520ce373f0b3 100644 (file)
@@ -178,8 +178,7 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
                chip_data->intpol_words[i] = size / 4;
                chip_data->intpol_bases[i] = of_iomap(node, i);
                if (ret || !chip_data->intpol_bases[i]) {
-                       pr_err("%s: couldn't map region %d\n",
-                              node->full_name, i);
+                       pr_err("%pOF: couldn't map region %d\n", node, i);
                        ret = -ENODEV;
                        goto out_free_intpol;
                }
index 05fa9f7af53cd78732802dfbec28c27770e6f01f..e8b31f52e071754640e291b6640cdf99b2e0e7ea 100644 (file)
@@ -179,7 +179,7 @@ static void __init icoll_add_domain(struct device_node *np,
                                             &icoll_irq_domain_ops, NULL);
 
        if (!icoll_domain)
-               panic("%s: unable to create irq domain", np->full_name);
+               panic("%pOF: unable to create irq domain", np);
 }
 
 static void __iomem * __init icoll_init_iobase(struct device_node *np)
@@ -188,7 +188,7 @@ static void __iomem * __init icoll_init_iobase(struct device_node *np)
 
        icoll_base = of_io_request_and_map(np, 0, np->name);
        if (IS_ERR(icoll_base))
-               panic("%s: unable to map resource", np->full_name);
+               panic("%pOF: unable to map resource", np);
        return icoll_base;
 }
 
index 491568c95aa54fe02c6c7f803b82a1df9bd6dbf5..45363ff8d06f0afb26c2b64d8bf5aa06d1f74aa3 100644 (file)
@@ -140,7 +140,7 @@ static int __init stm32_exti_init(struct device_node *node,
 
        base = of_iomap(node, 0);
        if (!base) {
-               pr_err("%s: Unable to map registers\n", node->full_name);
+               pr_err("%pOF: Unable to map registers\n", node);
                return -ENOMEM;
        }
 
@@ -149,7 +149,7 @@ static int __init stm32_exti_init(struct device_node *node,
        nr_exti = fls(readl_relaxed(base + EXTI_RTSR));
        writel_relaxed(0, base + EXTI_RTSR);
 
-       pr_info("%s: %d External IRQs detected\n", node->full_name, nr_exti);
+       pr_info("%pOF: %d External IRQs detected\n", node, nr_exti);
 
        domain = irq_domain_add_linear(node, nr_exti,
                                       &irq_exti_domain_ops, NULL);
@@ -163,8 +163,8 @@ static int __init stm32_exti_init(struct device_node *node,
        ret = irq_alloc_domain_generic_chips(domain, nr_exti, 1, "exti",
                                             handle_edge_irq, clr, 0, 0);
        if (ret) {
-               pr_err("%s: Could not allocate generic interrupt chip.\n",
-                       node->full_name);
+               pr_err("%pOF: Could not allocate generic interrupt chip.\n",
+                       node);
                goto out_free_domain;
        }
 
index 376b28074e0d8937c43036b647de218ef45c14b7..e3e5b9132b753eb5d6ddcfa7b5e57b5156bd0383 100644 (file)
@@ -97,8 +97,8 @@ static int __init sun4i_of_init(struct device_node *node,
 {
        sun4i_irq_base = of_iomap(node, 0);
        if (!sun4i_irq_base)
-               panic("%s: unable to map IC registers\n",
-                       node->full_name);
+               panic("%pOF: unable to map IC registers\n",
+                       node);
 
        /* Disable all interrupts */
        writel(0, sun4i_irq_base + SUN4I_IRQ_ENABLE_REG(0));
@@ -124,7 +124,7 @@ static int __init sun4i_of_init(struct device_node *node,
        sun4i_irq_domain = irq_domain_add_linear(node, 3 * 32,
                                                 &sun4i_irq_ops, NULL);
        if (!sun4i_irq_domain)
-               panic("%s: unable to create IRQ domain\n", node->full_name);
+               panic("%pOF: unable to create IRQ domain\n", node);
 
        set_handle_irq(sun4i_handle_irq);
 
index 3973a14bb15bafdeeced9c0362e6b1b84b68648d..0abc0cd1c32edea53d2162beb93ca8d25318133f 100644 (file)
@@ -291,13 +291,13 @@ static int __init tegra_ictlr_init(struct device_node *node,
        int err;
 
        if (!parent) {
-               pr_err("%s: no parent, giving up\n", node->full_name);
+               pr_err("%pOF: no parent, giving up\n", node);
                return -ENODEV;
        }
 
        parent_domain = irq_find_host(parent);
        if (!parent_domain) {
-               pr_err("%s: unable to obtain parent domain\n", node->full_name);
+               pr_err("%pOF: unable to obtain parent domain\n", node);
                return -ENXIO;
        }
 
@@ -329,29 +329,29 @@ static int __init tegra_ictlr_init(struct device_node *node,
        }
 
        if (!num_ictlrs) {
-               pr_err("%s: no valid regions, giving up\n", node->full_name);
+               pr_err("%pOF: no valid regions, giving up\n", node);
                err = -ENOMEM;
                goto out_free;
        }
 
        WARN(num_ictlrs != soc->num_ictlrs,
-            "%s: Found %u interrupt controllers in DT; expected %u.\n",
-            node->full_name, num_ictlrs, soc->num_ictlrs);
+            "%pOF: Found %u interrupt controllers in DT; expected %u.\n",
+            node, num_ictlrs, soc->num_ictlrs);
 
 
        domain = irq_domain_add_hierarchy(parent_domain, 0, num_ictlrs * 32,
                                          node, &tegra_ictlr_domain_ops,
                                          lic);
        if (!domain) {
-               pr_err("%s: failed to allocated domain\n", node->full_name);
+               pr_err("%pOF: failed to allocated domain\n", node);
                err = -ENOMEM;
                goto out_unmap;
        }
 
        tegra_ictlr_syscore_init();
 
-       pr_info("%s: %d interrupts forwarded to %s\n",
-               node->full_name, num_ictlrs * 32, parent->full_name);
+       pr_info("%pOF: %d interrupts forwarded to %pOF\n",
+               node, num_ictlrs * 32, parent);
 
        return 0;
 
index 3db7ab1c974168e0fefd354ad6b6f8505868b242..e3043ded89738f08f59f053c5f074aca9f70f4b7 100644 (file)
@@ -186,8 +186,8 @@ static int __init xilinx_intc_of_init(struct device_node *intc,
        if (irqc->intr_mask >> nr_irq)
                pr_warn("irq-xilinx: mismatch in kind-of-intr param\n");
 
-       pr_info("irq-xilinx: %s: num_irq=%d, edge=0x%x\n",
-               intc->full_name, nr_irq, irqc->intr_mask);
+       pr_info("irq-xilinx: %pOF: num_irq=%d, edge=0x%x\n",
+               intc, nr_irq, irqc->intr_mask);
 
 
        /*