* [PATCH] irqchip: Use of_property_read_bool() for boolean properties
@ 2023-03-10 14:47 Rob Herring
2023-03-12 12:42 ` Guo Ren
2023-04-08 10:45 ` [irqchip: irq/irqchip-next] " irqchip-bot for Rob Herring
0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring @ 2023-03-10 14:47 UTC (permalink / raw)
To: Thomas Gleixner, Marc Zyngier, Guo Ren
Cc: devicetree, linux-kernel, linux-csky
It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties.
Convert reading boolean properties to to of_property_read_bool().
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/irqchip/irq-csky-apb-intc.c | 2 +-
drivers/irqchip/irq-gic-v2m.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-csky-apb-intc.c b/drivers/irqchip/irq-csky-apb-intc.c
index 42d8a2438ebc..6710691e4c25 100644
--- a/drivers/irqchip/irq-csky-apb-intc.c
+++ b/drivers/irqchip/irq-csky-apb-intc.c
@@ -68,7 +68,7 @@ static void __init ck_set_gc(struct device_node *node, void __iomem *reg_base,
gc->chip_types[0].chip.irq_mask = irq_gc_mask_clr_bit;
gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit;
- if (of_find_property(node, "csky,support-pulse-signal", NULL))
+ if (of_property_read_bool(node, "csky,support-pulse-signal"))
gc->chip_types[0].chip.irq_unmask = irq_ck_mask_set_bit;
}
diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c
index f1e75b35a52a..f2ff4387870d 100644
--- a/drivers/irqchip/irq-gic-v2m.c
+++ b/drivers/irqchip/irq-gic-v2m.c
@@ -421,7 +421,7 @@ static int __init gicv2m_of_init(struct fwnode_handle *parent_handle,
u32 spi_start = 0, nr_spis = 0;
struct resource res;
- if (!of_find_property(child, "msi-controller", NULL))
+ if (!of_property_read_bool(child, "msi-controller"))
continue;
ret = of_address_to_resource(child, 0, &res);
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] irqchip: Use of_property_read_bool() for boolean properties
2023-03-10 14:47 [PATCH] irqchip: Use of_property_read_bool() for boolean properties Rob Herring
@ 2023-03-12 12:42 ` Guo Ren
2023-04-08 10:45 ` [irqchip: irq/irqchip-next] " irqchip-bot for Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Guo Ren @ 2023-03-12 12:42 UTC (permalink / raw)
To: Rob Herring
Cc: Thomas Gleixner, Marc Zyngier, devicetree, linux-kernel,
linux-csky
Acked-by: Guo Ren <guoren@kernel.org> (csky)
On Fri, Mar 10, 2023 at 10:48 PM Rob Herring <robh@kernel.org> wrote:
>
> It is preferred to use typed property access functions (i.e.
> of_property_read_<type> functions) rather than low-level
> of_get_property/of_find_property functions for reading properties.
> Convert reading boolean properties to to of_property_read_bool().
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> drivers/irqchip/irq-csky-apb-intc.c | 2 +-
> drivers/irqchip/irq-gic-v2m.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-csky-apb-intc.c b/drivers/irqchip/irq-csky-apb-intc.c
> index 42d8a2438ebc..6710691e4c25 100644
> --- a/drivers/irqchip/irq-csky-apb-intc.c
> +++ b/drivers/irqchip/irq-csky-apb-intc.c
> @@ -68,7 +68,7 @@ static void __init ck_set_gc(struct device_node *node, void __iomem *reg_base,
> gc->chip_types[0].chip.irq_mask = irq_gc_mask_clr_bit;
> gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit;
>
> - if (of_find_property(node, "csky,support-pulse-signal", NULL))
> + if (of_property_read_bool(node, "csky,support-pulse-signal"))
> gc->chip_types[0].chip.irq_unmask = irq_ck_mask_set_bit;
> }
>
> diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c
> index f1e75b35a52a..f2ff4387870d 100644
> --- a/drivers/irqchip/irq-gic-v2m.c
> +++ b/drivers/irqchip/irq-gic-v2m.c
> @@ -421,7 +421,7 @@ static int __init gicv2m_of_init(struct fwnode_handle *parent_handle,
> u32 spi_start = 0, nr_spis = 0;
> struct resource res;
>
> - if (!of_find_property(child, "msi-controller", NULL))
> + if (!of_property_read_bool(child, "msi-controller"))
> continue;
>
> ret = of_address_to_resource(child, 0, &res);
> --
> 2.39.2
>
--
Best Regards
Guo Ren
^ permalink raw reply [flat|nested] 3+ messages in thread
* [irqchip: irq/irqchip-next] irqchip: Use of_property_read_bool() for boolean properties
2023-03-10 14:47 [PATCH] irqchip: Use of_property_read_bool() for boolean properties Rob Herring
2023-03-12 12:42 ` Guo Ren
@ 2023-04-08 10:45 ` irqchip-bot for Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: irqchip-bot for Rob Herring @ 2023-04-08 10:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Rob Herring, Guo Ren, Marc Zyngier, tglx
The following commit has been merged into the irq/irqchip-next branch of irqchip:
Commit-ID: 9dfc77917e3b82dc7f93d62cebf1ebb885e9cc6a
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/9dfc77917e3b82dc7f93d62cebf1ebb885e9cc6a
Author: Rob Herring <robh@kernel.org>
AuthorDate: Fri, 10 Mar 2023 08:47:10 -06:00
Committer: Marc Zyngier <maz@kernel.org>
CommitterDate: Sat, 08 Apr 2023 11:07:49 +01:00
irqchip: Use of_property_read_bool() for boolean properties
It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties.
Convert reading boolean properties to to of_property_read_bool().
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Guo Ren <guoren@kernel.org> (csky)
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230310144710.1543070-1-robh@kernel.org
---
drivers/irqchip/irq-csky-apb-intc.c | 2 +-
drivers/irqchip/irq-gic-v2m.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-csky-apb-intc.c b/drivers/irqchip/irq-csky-apb-intc.c
index 42d8a24..6710691 100644
--- a/drivers/irqchip/irq-csky-apb-intc.c
+++ b/drivers/irqchip/irq-csky-apb-intc.c
@@ -68,7 +68,7 @@ static void __init ck_set_gc(struct device_node *node, void __iomem *reg_base,
gc->chip_types[0].chip.irq_mask = irq_gc_mask_clr_bit;
gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit;
- if (of_find_property(node, "csky,support-pulse-signal", NULL))
+ if (of_property_read_bool(node, "csky,support-pulse-signal"))
gc->chip_types[0].chip.irq_unmask = irq_ck_mask_set_bit;
}
diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c
index f1e75b3..f2ff438 100644
--- a/drivers/irqchip/irq-gic-v2m.c
+++ b/drivers/irqchip/irq-gic-v2m.c
@@ -421,7 +421,7 @@ static int __init gicv2m_of_init(struct fwnode_handle *parent_handle,
u32 spi_start = 0, nr_spis = 0;
struct resource res;
- if (!of_find_property(child, "msi-controller", NULL))
+ if (!of_property_read_bool(child, "msi-controller"))
continue;
ret = of_address_to_resource(child, 0, &res);
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-08 10:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-10 14:47 [PATCH] irqchip: Use of_property_read_bool() for boolean properties Rob Herring
2023-03-12 12:42 ` Guo Ren
2023-04-08 10:45 ` [irqchip: irq/irqchip-next] " irqchip-bot for Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox