Skip to contentSkip to conversation

irqchip: orion: use of_address_count() helper

PATCH Applied Yang Yingliang 2 participants 2 messages Jul 26, 2023 – Aug 21, 2023 irqchip drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irqchip: orion: use of_address_count() helper

After commit 16988c742968 ("of/address: introduce of_address_count() helper"), Use of_address_count() to instead of open-coding it, it's no functional change.

---
 drivers/irqchip/irq-orion.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/irqchip/irq-orion.c +1 -2
index 17c2c7a07f10..4e4e874e09a8 100644
@@ -57,8 +57,7 @@ static int __init orion_irq_init(struct device_node *np,
 	struct resource r;
 
 	/* count number of irq chips by valid reg addresses */
-	while (of_address_to_resource(np, num_chips, &r) == 0)
-		num_chips++;
+	num_chips = of_address_count(np);
 
 	orion_irq_domain = irq_domain_add_linear(np,
 				num_chips * ORION_IRQS_PER_CHIP,
Signature · 1 line
2.25.1
#1 lore raw

[irqchip: irq/irqchip-next] irqchip/orion: Use of_address_count() helper

The following commit has been merged into the irq/irqchip-next branch of irqchip:

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     70befedaf5b020a08d397e2d6a9c306f0f611cfb
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/70befedaf5b020a08d397e2d6a9c306f0f611cfb
Author:        Yang Yingliang <[email protected]>
AuthorDate:    Wed, 26 Jul 2023 11:07:41 +08:00
Committer:     Marc Zyngier <[email protected]>
CommitterDate: Mon, 21 Aug 2023 17:48:59 +01:00

irqchip/orion: Use of_address_count() helper

After commit 16988c742968 ("of/address: introduce of_address_count() helper"), Use of_address_count() to instead of open-coding it, it's no functional change.

---
 drivers/irqchip/irq-orion.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/irqchip/irq-orion.c +1 -2
index 17c2c7a..4e4e874 100644
@@ -57,8 +57,7 @@ static int __init orion_irq_init(struct device_node *np,
 	struct resource r;
 
 	/* count number of irq chips by valid reg addresses */
-	while (of_address_to_resource(np, num_chips, &r) == 0)
-		num_chips++;
+	num_chips = of_address_count(np);
 
 	orion_irq_domain = irq_domain_add_linear(np,
 				num_chips * ORION_IRQS_PER_CHIP,