Skip to content

Commit 2ef790d

Browse files
committed
irqchip: Convert to using %pOFn instead of device_node.name
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Acked-by: Thomas Gleixner <[email protected]> Cc: Jason Cooper <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: [email protected] Signed-off-by: Rob Herring <[email protected]>
1 parent 229c55c commit 2ef790d

File tree

6 files changed

+33
-33
lines changed

6 files changed

+33
-33
lines changed

drivers/irqchip/irq-gic-v3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,8 +1184,8 @@ static void __init gic_populate_ppi_partitions(struct device_node *gic_node)
11841184

11851185
part->partition_id = of_node_to_fwnode(child_part);
11861186

1187-
pr_info("GIC: PPI partition %s[%d] { ",
1188-
child_part->name, part_idx);
1187+
pr_info("GIC: PPI partition %pOFn[%d] { ",
1188+
child_part, part_idx);
11891189

11901190
n = of_property_count_elems_of_size(child_part, "affinity",
11911191
sizeof(u32));

drivers/irqchip/irq-mscc-ocelot.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,22 +72,22 @@ static int __init ocelot_irq_init(struct device_node *node,
7272
domain = irq_domain_add_linear(node, OCELOT_NR_IRQ,
7373
&irq_generic_chip_ops, NULL);
7474
if (!domain) {
75-
pr_err("%s: unable to add irq domain\n", node->name);
75+
pr_err("%pOFn: unable to add irq domain\n", node);
7676
return -ENOMEM;
7777
}
7878

7979
ret = irq_alloc_domain_generic_chips(domain, OCELOT_NR_IRQ, 1,
8080
"icpu", handle_level_irq,
8181
0, 0, 0);
8282
if (ret) {
83-
pr_err("%s: unable to alloc irq domain gc\n", node->name);
83+
pr_err("%pOFn: unable to alloc irq domain gc\n", node);
8484
goto err_domain_remove;
8585
}
8686

8787
gc = irq_get_domain_generic_chip(domain, 0);
8888
gc->reg_base = of_iomap(node, 0);
8989
if (!gc->reg_base) {
90-
pr_err("%s: unable to map resource\n", node->name);
90+
pr_err("%pOFn: unable to map resource\n", node);
9191
ret = -ENOMEM;
9292
goto err_gc_free;
9393
}

drivers/irqchip/irq-orion.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ static int __init orion_irq_init(struct device_node *np,
6464
num_chips * ORION_IRQS_PER_CHIP,
6565
&irq_generic_chip_ops, NULL);
6666
if (!orion_irq_domain)
67-
panic("%s: unable to add irq domain\n", np->name);
67+
panic("%pOFn: unable to add irq domain\n", np);
6868

6969
ret = irq_alloc_domain_generic_chips(orion_irq_domain,
70-
ORION_IRQS_PER_CHIP, 1, np->name,
70+
ORION_IRQS_PER_CHIP, 1, np->full_name,
7171
handle_level_irq, clr, 0,
7272
IRQ_GC_INIT_MASK_CACHE);
7373
if (ret)
74-
panic("%s: unable to alloc irq domain gc\n", np->name);
74+
panic("%pOFn: unable to alloc irq domain gc\n", np);
7575

7676
for (n = 0, base = 0; n < num_chips; n++, base += ORION_IRQS_PER_CHIP) {
7777
struct irq_chip_generic *gc =
@@ -80,12 +80,12 @@ static int __init orion_irq_init(struct device_node *np,
8080
of_address_to_resource(np, n, &r);
8181

8282
if (!request_mem_region(r.start, resource_size(&r), np->name))
83-
panic("%s: unable to request mem region %d",
84-
np->name, n);
83+
panic("%pOFn: unable to request mem region %d",
84+
np, n);
8585

8686
gc->reg_base = ioremap(r.start, resource_size(&r));
8787
if (!gc->reg_base)
88-
panic("%s: unable to map resource %d", np->name, n);
88+
panic("%pOFn: unable to map resource %d", np, n);
8989

9090
gc->chip_types[0].regs.mask = ORION_IRQ_MASK;
9191
gc->chip_types[0].chip.irq_mask = irq_gc_mask_clr_bit;
@@ -150,20 +150,20 @@ static int __init orion_bridge_irq_init(struct device_node *np,
150150
domain = irq_domain_add_linear(np, nrirqs,
151151
&irq_generic_chip_ops, NULL);
152152
if (!domain) {
153-
pr_err("%s: unable to add irq domain\n", np->name);
153+
pr_err("%pOFn: unable to add irq domain\n", np);
154154
return -ENOMEM;
155155
}
156156

157157
ret = irq_alloc_domain_generic_chips(domain, nrirqs, 1, np->name,
158158
handle_edge_irq, clr, 0, IRQ_GC_INIT_MASK_CACHE);
159159
if (ret) {
160-
pr_err("%s: unable to alloc irq domain gc\n", np->name);
160+
pr_err("%pOFn: unable to alloc irq domain gc\n", np);
161161
return ret;
162162
}
163163

164164
ret = of_address_to_resource(np, 0, &r);
165165
if (ret) {
166-
pr_err("%s: unable to get resource\n", np->name);
166+
pr_err("%pOFn: unable to get resource\n", np);
167167
return ret;
168168
}
169169

@@ -175,14 +175,14 @@ static int __init orion_bridge_irq_init(struct device_node *np,
175175
/* Map the parent interrupt for the chained handler */
176176
irq = irq_of_parse_and_map(np, 0);
177177
if (irq <= 0) {
178-
pr_err("%s: unable to parse irq\n", np->name);
178+
pr_err("%pOFn: unable to parse irq\n", np);
179179
return -EINVAL;
180180
}
181181

182182
gc = irq_get_domain_generic_chip(domain, 0);
183183
gc->reg_base = ioremap(r.start, resource_size(&r));
184184
if (!gc->reg_base) {
185-
pr_err("%s: unable to map resource\n", np->name);
185+
pr_err("%pOFn: unable to map resource\n", np);
186186
return -ENOMEM;
187187
}
188188

drivers/irqchip/irq-stm32-exti.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,8 +678,8 @@ static int __init stm32_exti_init(const struct stm32_exti_drv_data *drv_data,
678678
domain = irq_domain_add_linear(node, drv_data->bank_nr * IRQS_PER_BANK,
679679
&irq_exti_domain_ops, NULL);
680680
if (!domain) {
681-
pr_err("%s: Could not register interrupt domain.\n",
682-
node->name);
681+
pr_err("%pOFn: Could not register interrupt domain.\n",
682+
node);
683683
ret = -ENOMEM;
684684
goto out_unmap;
685685
}
@@ -768,7 +768,7 @@ __init stm32_exti_hierarchy_init(const struct stm32_exti_drv_data *drv_data,
768768
host_data);
769769

770770
if (!domain) {
771-
pr_err("%s: Could not register exti domain.\n", node->name);
771+
pr_err("%pOFn: Could not register exti domain.\n", node);
772772
ret = -ENOMEM;
773773
goto out_unmap;
774774
}

drivers/irqchip/irq-tango.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,24 +184,24 @@ static int __init tangox_irq_init(void __iomem *base, struct resource *baseres,
184184

185185
irq = irq_of_parse_and_map(node, 0);
186186
if (!irq)
187-
panic("%s: failed to get IRQ", node->name);
187+
panic("%pOFn: failed to get IRQ", node);
188188

189189
err = of_address_to_resource(node, 0, &res);
190190
if (err)
191-
panic("%s: failed to get address", node->name);
191+
panic("%pOFn: failed to get address", node);
192192

193193
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
194194
chip->ctl = res.start - baseres->start;
195195
chip->base = base;
196196

197197
dom = irq_domain_add_linear(node, 64, &irq_generic_chip_ops, chip);
198198
if (!dom)
199-
panic("%s: failed to create irqdomain", node->name);
199+
panic("%pOFn: failed to create irqdomain", node);
200200

201201
err = irq_alloc_domain_generic_chips(dom, 32, 2, node->name,
202202
handle_level_irq, 0, 0, 0);
203203
if (err)
204-
panic("%s: failed to allocate irqchip", node->name);
204+
panic("%pOFn: failed to allocate irqchip", node);
205205

206206
tangox_irq_domain_init(dom);
207207

@@ -219,7 +219,7 @@ static int __init tangox_of_irq_init(struct device_node *node,
219219

220220
base = of_iomap(node, 0);
221221
if (!base)
222-
panic("%s: of_iomap failed", node->name);
222+
panic("%pOFn: of_iomap failed", node);
223223

224224
of_address_to_resource(node, 0, &res);
225225

drivers/irqchip/irq-tb10x.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,30 +115,30 @@ static int __init of_tb10x_init_irq(struct device_node *ictl,
115115
void __iomem *reg_base;
116116

117117
if (of_address_to_resource(ictl, 0, &mem)) {
118-
pr_err("%s: No registers declared in DeviceTree.\n",
119-
ictl->name);
118+
pr_err("%pOFn: No registers declared in DeviceTree.\n",
119+
ictl);
120120
return -EINVAL;
121121
}
122122

123123
if (!request_mem_region(mem.start, resource_size(&mem),
124-
ictl->name)) {
125-
pr_err("%s: Request mem region failed.\n", ictl->name);
124+
ictl->full_name)) {
125+
pr_err("%pOFn: Request mem region failed.\n", ictl);
126126
return -EBUSY;
127127
}
128128

129129
reg_base = ioremap(mem.start, resource_size(&mem));
130130
if (!reg_base) {
131131
ret = -EBUSY;
132-
pr_err("%s: ioremap failed.\n", ictl->name);
132+
pr_err("%pOFn: ioremap failed.\n", ictl);
133133
goto ioremap_fail;
134134
}
135135

136136
domain = irq_domain_add_linear(ictl, AB_IRQCTL_MAXIRQ,
137137
&irq_generic_chip_ops, NULL);
138138
if (!domain) {
139139
ret = -ENOMEM;
140-
pr_err("%s: Could not register interrupt domain.\n",
141-
ictl->name);
140+
pr_err("%pOFn: Could not register interrupt domain.\n",
141+
ictl);
142142
goto irq_domain_add_fail;
143143
}
144144

@@ -147,8 +147,8 @@ static int __init of_tb10x_init_irq(struct device_node *ictl,
147147
IRQ_NOREQUEST, IRQ_NOPROBE,
148148
IRQ_GC_INIT_MASK_CACHE);
149149
if (ret) {
150-
pr_err("%s: Could not allocate generic interrupt chip.\n",
151-
ictl->name);
150+
pr_err("%pOFn: Could not allocate generic interrupt chip.\n",
151+
ictl);
152152
goto gc_alloc_fail;
153153
}
154154

0 commit comments

Comments
 (0)