* [PATCH] iommu: omap: Use of_property_read_bool() for boolean properties
@ 2023-03-10 14:47 Rob Herring
2023-03-10 16:18 ` Robin Murphy
2023-03-22 13:57 ` Joerg Roedel
0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring @ 2023-03-10 14:47 UTC (permalink / raw)
To: Joerg Roedel, Will Deacon, Robin Murphy; +Cc: devicetree, iommu, linux-kernel
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/iommu/omap-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 3ab078112a7c..baafd6211ac4 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -1191,7 +1191,7 @@ static int omap_iommu_probe(struct platform_device *pdev)
return err;
if (obj->nr_tlb_entries != 32 && obj->nr_tlb_entries != 8)
return -EINVAL;
- if (of_find_property(of, "ti,iommu-bus-err-back", NULL))
+ if (of_property_read_bool(of, "ti,iommu-bus-err-back"))
obj->has_bus_err_back = MMU_GP_REG_BUS_ERR_BACK_EN;
obj->dev = &pdev->dev;
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iommu: omap: Use of_property_read_bool() for boolean properties
2023-03-10 14:47 [PATCH] iommu: omap: Use of_property_read_bool() for boolean properties Rob Herring
@ 2023-03-10 16:18 ` Robin Murphy
2023-03-22 13:57 ` Joerg Roedel
1 sibling, 0 replies; 3+ messages in thread
From: Robin Murphy @ 2023-03-10 16:18 UTC (permalink / raw)
To: Rob Herring, Joerg Roedel, Will Deacon; +Cc: devicetree, iommu, linux-kernel
On 2023-03-10 14:47, Rob Herring 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().
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> drivers/iommu/omap-iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
> index 3ab078112a7c..baafd6211ac4 100644
> --- a/drivers/iommu/omap-iommu.c
> +++ b/drivers/iommu/omap-iommu.c
> @@ -1191,7 +1191,7 @@ static int omap_iommu_probe(struct platform_device *pdev)
> return err;
> if (obj->nr_tlb_entries != 32 && obj->nr_tlb_entries != 8)
> return -EINVAL;
> - if (of_find_property(of, "ti,iommu-bus-err-back", NULL))
> + if (of_property_read_bool(of, "ti,iommu-bus-err-back"))
> obj->has_bus_err_back = MMU_GP_REG_BUS_ERR_BACK_EN;
>
> obj->dev = &pdev->dev;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iommu: omap: Use of_property_read_bool() for boolean properties
2023-03-10 14:47 [PATCH] iommu: omap: Use of_property_read_bool() for boolean properties Rob Herring
2023-03-10 16:18 ` Robin Murphy
@ 2023-03-22 13:57 ` Joerg Roedel
1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2023-03-22 13:57 UTC (permalink / raw)
To: Rob Herring; +Cc: Will Deacon, Robin Murphy, devicetree, iommu, linux-kernel
On Fri, Mar 10, 2023 at 08:47:09AM -0600, Rob Herring wrote:
> drivers/iommu/omap-iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied with minor style fixes in the commit message.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-22 13:57 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] iommu: omap: Use of_property_read_bool() for boolean properties Rob Herring
2023-03-10 16:18 ` Robin Murphy
2023-03-22 13:57 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).