Skip to contentSkip to conversation

irqchip/stm32mp-exti: Use of_property_present() for non-boolean properties

PATCH Applied Rob Herring (Arm) 3 participants 3 messages Nov 4, 2024 – Nov 6, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irqchip/stm32mp-exti: Use of_property_present() for non-boolean properties

The use of of_property_read_bool() for non-boolean properties is deprecated in favor of of_property_present() when testing for property presence.

---
 drivers/irqchip/irq-stm32mp-exti.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/irqchip/irq-stm32mp-exti.c +1 -2
index 33e0cfdea654..cb83d6cc6113 100644
@@ -696,8 +696,7 @@ static int stm32mp_exti_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	if (of_property_read_bool(np, "interrupts-extended"))
-		host_data->dt_has_irqs_desc = true;
+	host_data->dt_has_irqs_desc = of_property_present(np, "interrupts-extended");
 
 	return 0;
 }
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Rob Herring (Arm)

The use of of_property_read_bool() for non-boolean properties is deprecated in favor of of_property_present() when testing for property presence.

---
 drivers/irqchip/irq-stm32mp-exti.c | 3 +--

 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/irqchip/irq-stm32mp-exti.c +0 -0
index 33e0cfdea654..cb83d6cc6113 100644
@@ -696,8 +696,7 @@ static int stm32mp_exti_probe(struct platform_device *pdev)
         if (ret)
                 return ret;
Quoted 7 lines


-       if (of_property_read_bool(np, "interrupts-extended"))
-               host_data->dt_has_irqs_desc = true;
+       host_data->dt_has_irqs_desc = of_property_present(np, "interrupts-extended");
        return 0;
 }

Thanks,
Antonio

#2 lore raw
In reply to Rob Herring (Arm)
The following commit has been merged into the irq/core branch of tip:

The following commit has been merged into the irq/core branch of tip:

Commit-ID:     194c4f569eac889d9b0822bc001771683b6e9b8a
Gitweb:        https://git.kernel.org/tip/194c4f569eac889d9b0822bc001771683b6e9b8a
Author:        Rob Herring (Arm) <[email protected]>
AuthorDate:    Mon, 04 Nov 2024 13:08:35 -06:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Thu, 07 Nov 2024 00:23:59 +01:00

irqchip/stm32mp-exti: Use of_property_present() for non-boolean properties

The use of of_property_read_bool() for non-boolean properties is deprecated in favor of of_property_present() when testing for property presence.

---
 drivers/irqchip/irq-stm32mp-exti.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/irqchip/irq-stm32mp-exti.c +1 -2
index 33e0cfd..cb83d6c 100644
@@ -696,8 +696,7 @@ static int stm32mp_exti_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	if (of_property_read_bool(np, "interrupts-extended"))
-		host_data->dt_has_irqs_desc = true;
+	host_data->dt_has_irqs_desc = of_property_present(np, "interrupts-extended");
 
 	return 0;
 }