* [PATCH] firmware: Use of_property_present() for testing DT property presence
@ 2023-03-10 14:47 Rob Herring
2023-03-23 12:00 ` Sudeep Holla
2023-04-04 19:53 ` Thierry Reding
0 siblings, 2 replies; 6+ messages in thread
From: Rob Herring @ 2023-03-10 14:47 UTC (permalink / raw)
To: Sudeep Holla, Cristian Marussi, Thierry Reding, Jonathan Hunter
Cc: devicetree, linux-arm-kernel, linux-kernel, linux-tegra
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. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/firmware/arm_scmi/optee.c | 2 +-
drivers/firmware/tegra/bpmp.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/firmware/arm_scmi/optee.c b/drivers/firmware/arm_scmi/optee.c
index 929720387102..e123de6e8c67 100644
--- a/drivers/firmware/arm_scmi/optee.c
+++ b/drivers/firmware/arm_scmi/optee.c
@@ -403,7 +403,7 @@ static int setup_static_shmem(struct device *dev, struct scmi_chan_info *cinfo,
static int setup_shmem(struct device *dev, struct scmi_chan_info *cinfo,
struct scmi_optee_channel *channel)
{
- if (of_find_property(cinfo->dev->of_node, "shmem", NULL))
+ if (of_property_present(cinfo->dev->of_node, "shmem"))
return setup_static_shmem(dev, cinfo, channel);
else
return setup_dynamic_shmem(dev, channel);
diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c
index 042c2043929d..8b5e5daa9fae 100644
--- a/drivers/firmware/tegra/bpmp.c
+++ b/drivers/firmware/tegra/bpmp.c
@@ -764,19 +764,19 @@ static int tegra_bpmp_probe(struct platform_device *pdev)
if (err < 0)
goto free_mrq;
- if (of_find_property(pdev->dev.of_node, "#clock-cells", NULL)) {
+ if (of_property_present(pdev->dev.of_node, "#clock-cells")) {
err = tegra_bpmp_init_clocks(bpmp);
if (err < 0)
goto free_mrq;
}
- if (of_find_property(pdev->dev.of_node, "#reset-cells", NULL)) {
+ if (of_property_present(pdev->dev.of_node, "#reset-cells")) {
err = tegra_bpmp_init_resets(bpmp);
if (err < 0)
goto free_mrq;
}
- if (of_find_property(pdev->dev.of_node, "#power-domain-cells", NULL)) {
+ if (of_property_present(pdev->dev.of_node, "#power-domain-cells")) {
err = tegra_bpmp_init_powergates(bpmp);
if (err < 0)
goto free_mrq;
--
2.39.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] firmware: Use of_property_present() for testing DT property presence
2023-03-10 14:47 [PATCH] firmware: Use of_property_present() for testing DT property presence Rob Herring
@ 2023-03-23 12:00 ` Sudeep Holla
2023-04-04 13:30 ` Thierry Reding
2023-04-04 19:53 ` Thierry Reding
1 sibling, 1 reply; 6+ messages in thread
From: Sudeep Holla @ 2023-03-23 12:00 UTC (permalink / raw)
To: Rob Herring
Cc: Cristian Marussi, Sudeep Holla, Thierry Reding, Jonathan Hunter,
devicetree, linux-arm-kernel, linux-kernel, linux-tegra
On Fri, Mar 10, 2023 at 08:47:04AM -0600, 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. As
> part of this, convert of_get_property/of_find_property calls to the
> recently added of_property_present() helper when we just want to test
> for presence of a property and nothing more.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> drivers/firmware/arm_scmi/optee.c | 2 +-
Acked-by: Sudeep Holla <sudeep.holla@arm.com>(for the SCMI part)
I am assuming you will route this as it has other changes as well in the
patch.
--
Regards,
Sudeep
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] firmware: Use of_property_present() for testing DT property presence
2023-03-23 12:00 ` Sudeep Holla
@ 2023-04-04 13:30 ` Thierry Reding
2023-04-04 16:58 ` Rob Herring
0 siblings, 1 reply; 6+ messages in thread
From: Thierry Reding @ 2023-04-04 13:30 UTC (permalink / raw)
To: Sudeep Holla
Cc: Rob Herring, Cristian Marussi, Jonathan Hunter, devicetree,
linux-arm-kernel, linux-kernel, linux-tegra
[-- Attachment #1.1: Type: text/plain, Size: 1028 bytes --]
On Thu, Mar 23, 2023 at 12:00:30PM +0000, Sudeep Holla wrote:
> On Fri, Mar 10, 2023 at 08:47:04AM -0600, 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. As
> > part of this, convert of_get_property/of_find_property calls to the
> > recently added of_property_present() helper when we just want to test
> > for presence of a property and nothing more.
> >
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> > drivers/firmware/arm_scmi/optee.c | 2 +-
>
> Acked-by: Sudeep Holla <sudeep.holla@arm.com>(for the SCMI part)
>
> I am assuming you will route this as it has other changes as well in the
> patch.
I can also pick this up along with the Tegra changes if Rob doesn't
want to take it. But also feel free to take this through whatever tree
works best, for the Tegra parts:
Acked-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] firmware: Use of_property_present() for testing DT property presence
2023-04-04 13:30 ` Thierry Reding
@ 2023-04-04 16:58 ` Rob Herring
2023-04-04 19:52 ` Thierry Reding
0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2023-04-04 16:58 UTC (permalink / raw)
To: Thierry Reding
Cc: Sudeep Holla, Cristian Marussi, Jonathan Hunter, devicetree,
linux-arm-kernel, linux-kernel, linux-tegra
On Tue, Apr 04, 2023 at 03:30:02PM +0200, Thierry Reding wrote:
> On Thu, Mar 23, 2023 at 12:00:30PM +0000, Sudeep Holla wrote:
> > On Fri, Mar 10, 2023 at 08:47:04AM -0600, 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. As
> > > part of this, convert of_get_property/of_find_property calls to the
> > > recently added of_property_present() helper when we just want to test
> > > for presence of a property and nothing more.
> > >
> > > Signed-off-by: Rob Herring <robh@kernel.org>
> > > ---
> > > drivers/firmware/arm_scmi/optee.c | 2 +-
> >
> > Acked-by: Sudeep Holla <sudeep.holla@arm.com>(for the SCMI part)
> >
> > I am assuming you will route this as it has other changes as well in the
> > patch.
>
> I can also pick this up along with the Tegra changes if Rob doesn't
> want to take it. But also feel free to take this through whatever tree
> works best, for the Tegra parts:
>
> Acked-by: Thierry Reding <treding@nvidia.com>
You can take it. Thanks.
Rob
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] firmware: Use of_property_present() for testing DT property presence
2023-04-04 16:58 ` Rob Herring
@ 2023-04-04 19:52 ` Thierry Reding
0 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2023-04-04 19:52 UTC (permalink / raw)
To: Rob Herring
Cc: Sudeep Holla, Cristian Marussi, Jonathan Hunter, devicetree,
linux-arm-kernel, linux-kernel, linux-tegra
[-- Attachment #1.1: Type: text/plain, Size: 1316 bytes --]
On Tue, Apr 04, 2023 at 11:58:46AM -0500, Rob Herring wrote:
> On Tue, Apr 04, 2023 at 03:30:02PM +0200, Thierry Reding wrote:
> > On Thu, Mar 23, 2023 at 12:00:30PM +0000, Sudeep Holla wrote:
> > > On Fri, Mar 10, 2023 at 08:47:04AM -0600, 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. As
> > > > part of this, convert of_get_property/of_find_property calls to the
> > > > recently added of_property_present() helper when we just want to test
> > > > for presence of a property and nothing more.
> > > >
> > > > Signed-off-by: Rob Herring <robh@kernel.org>
> > > > ---
> > > > drivers/firmware/arm_scmi/optee.c | 2 +-
> > >
> > > Acked-by: Sudeep Holla <sudeep.holla@arm.com>(for the SCMI part)
> > >
> > > I am assuming you will route this as it has other changes as well in the
> > > patch.
> >
> > I can also pick this up along with the Tegra changes if Rob doesn't
> > want to take it. But also feel free to take this through whatever tree
> > works best, for the Tegra parts:
> >
> > Acked-by: Thierry Reding <treding@nvidia.com>
>
> You can take it. Thanks.
Applied now, thanks.
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] firmware: Use of_property_present() for testing DT property presence
2023-03-10 14:47 [PATCH] firmware: Use of_property_present() for testing DT property presence Rob Herring
2023-03-23 12:00 ` Sudeep Holla
@ 2023-04-04 19:53 ` Thierry Reding
1 sibling, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2023-04-04 19:53 UTC (permalink / raw)
To: Thierry Reding, Cristian Marussi, Sudeep Holla, Jonathan Hunter,
Rob Herring
Cc: linux-tegra, linux-arm-kernel, devicetree, linux-kernel
From: Thierry Reding <treding@nvidia.com>
On Fri, 10 Mar 2023 08:47:04 -0600, 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. As
> part of this, convert of_get_property/of_find_property calls to the
> recently added of_property_present() helper when we just want to test
> for presence of a property and nothing more.
>
> [...]
Applied, thanks!
[1/1] firmware: Use of_property_present() for testing DT property presence
commit: 8c47b8253f4cfd8b4dbda8c9adc1d0b1d7f3009d
Best regards,
--
Thierry Reding <treding@nvidia.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-04-04 19:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-10 14:47 [PATCH] firmware: Use of_property_present() for testing DT property presence Rob Herring
2023-03-23 12:00 ` Sudeep Holla
2023-04-04 13:30 ` Thierry Reding
2023-04-04 16:58 ` Rob Herring
2023-04-04 19:52 ` Thierry Reding
2023-04-04 19:53 ` Thierry Reding
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).