diff mbox series

[11/20] irqchip/atmel-aic: convert to of_property_for_each_u32_new()

Message ID 20240703-of_property_for_each_u32-v1-11-42c1fc0b82aa@bootlin.com
State New
Headers show
Series Simplify of_property_for_each_u32() | expand

Commit Message

Luca Ceresoli July 3, 2024, 10:36 a.m. UTC
Simplify code using of_property_for_each_u32_new() as the two additional
parameters in of_property_for_each_u32() are not used here.

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
 drivers/irqchip/irq-atmel-aic-common.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Nicolas Ferre July 3, 2024, 1:09 p.m. UTC | #1
On 03/07/2024 at 12:36, Luca Ceresoli wrote:
> Simplify code using of_property_for_each_u32_new() as the two additional
> parameters in of_property_for_each_u32() are not used here.
> 
> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

> ---
>   drivers/irqchip/irq-atmel-aic-common.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/irqchip/irq-atmel-aic-common.c b/drivers/irqchip/irq-atmel-aic-common.c
> index 072bd227b6c6..543ea249df53 100644
> --- a/drivers/irqchip/irq-atmel-aic-common.c
> +++ b/drivers/irqchip/irq-atmel-aic-common.c
> @@ -111,8 +111,6 @@ static void __init aic_common_ext_irq_of_init(struct irq_domain *domain)
>          struct device_node *node = irq_domain_get_of_node(domain);
>          struct irq_chip_generic *gc;
>          struct aic_chip_data *aic;
> -       struct property *prop;
> -       const __be32 *p;
>          u32 hwirq;
> 
>          gc = irq_get_domain_generic_chip(domain, 0);
> @@ -120,7 +118,7 @@ static void __init aic_common_ext_irq_of_init(struct irq_domain *domain)
>          aic = gc->private;
>          aic->ext_irqs |= 1;
> 
> -       of_property_for_each_u32(node, "atmel,external-irqs", prop, p, hwirq) {
> +       of_property_for_each_u32_new(node, "atmel,external-irqs", hwirq) {
>                  gc = irq_get_domain_generic_chip(domain, hwirq);
>                  if (!gc) {
>                          pr_warn("AIC: external irq %d >= %d skip it\n",
> 
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/irqchip/irq-atmel-aic-common.c b/drivers/irqchip/irq-atmel-aic-common.c
index 072bd227b6c6..543ea249df53 100644
--- a/drivers/irqchip/irq-atmel-aic-common.c
+++ b/drivers/irqchip/irq-atmel-aic-common.c
@@ -111,8 +111,6 @@  static void __init aic_common_ext_irq_of_init(struct irq_domain *domain)
 	struct device_node *node = irq_domain_get_of_node(domain);
 	struct irq_chip_generic *gc;
 	struct aic_chip_data *aic;
-	struct property *prop;
-	const __be32 *p;
 	u32 hwirq;
 
 	gc = irq_get_domain_generic_chip(domain, 0);
@@ -120,7 +118,7 @@  static void __init aic_common_ext_irq_of_init(struct irq_domain *domain)
 	aic = gc->private;
 	aic->ext_irqs |= 1;
 
-	of_property_for_each_u32(node, "atmel,external-irqs", prop, p, hwirq) {
+	of_property_for_each_u32_new(node, "atmel,external-irqs", hwirq) {
 		gc = irq_get_domain_generic_chip(domain, hwirq);
 		if (!gc) {
 			pr_warn("AIC: external irq %d >= %d skip it\n",