* [PATCH] devfreq: imx-bus: Use of_property_present()
@ 2024-07-31 19:12 Rob Herring (Arm)
2024-08-01 1:50 ` Peng Fan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Rob Herring (Arm) @ 2024-07-31 19:12 UTC (permalink / raw)
To: MyungJoo Ham, Kyungmin Park, Chanwoo Choi, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
Cc: linux-pm, imx, linux-arm-kernel, linux-kernel
Use of_property_present() to test for property presence rather than
of_get_property(). This is part of a larger effort to remove callers
of of_get_property() and similar functions. of_get_property() leaks
the DT property data pointer which is a problem for dynamically
allocated nodes which may be freed.
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
drivers/devfreq/imx-bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/devfreq/imx-bus.c b/drivers/devfreq/imx-bus.c
index 86850b7dea09..49798f542d68 100644
--- a/drivers/devfreq/imx-bus.c
+++ b/drivers/devfreq/imx-bus.c
@@ -59,7 +59,7 @@ static int imx_bus_init_icc(struct device *dev)
struct imx_bus *priv = dev_get_drvdata(dev);
const char *icc_driver_name;
- if (!of_get_property(dev->of_node, "#interconnect-cells", NULL))
+ if (!of_property_present(dev->of_node, "#interconnect-cells"))
return 0;
if (!IS_ENABLED(CONFIG_INTERCONNECT_IMX)) {
dev_warn(dev, "imx interconnect drivers disabled\n");
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] devfreq: imx-bus: Use of_property_present()
2024-07-31 19:12 [PATCH] devfreq: imx-bus: Use of_property_present() Rob Herring (Arm)
@ 2024-08-01 1:50 ` Peng Fan
2024-09-03 19:20 ` Rob Herring
2024-09-04 15:35 ` Chanwoo Choi
2 siblings, 0 replies; 4+ messages in thread
From: Peng Fan @ 2024-08-01 1:50 UTC (permalink / raw)
To: Rob Herring (Arm), MyungJoo Ham, Kyungmin Park, Chanwoo Choi,
Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
Cc: linux-pm@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
> Subject: [PATCH] devfreq: imx-bus: Use of_property_present()
>
> Use of_property_present() to test for property presence rather than
> of_get_property(). This is part of a larger effort to remove callers of
> of_get_property() and similar functions. of_get_property() leaks the DT
> property data pointer which is a problem for dynamically allocated
> nodes which may be freed.
>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Acked-by: Peng Fan <peng.fan@nxp.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] devfreq: imx-bus: Use of_property_present()
2024-07-31 19:12 [PATCH] devfreq: imx-bus: Use of_property_present() Rob Herring (Arm)
2024-08-01 1:50 ` Peng Fan
@ 2024-09-03 19:20 ` Rob Herring
2024-09-04 15:35 ` Chanwoo Choi
2 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2024-09-03 19:20 UTC (permalink / raw)
To: MyungJoo Ham, Kyungmin Park, Chanwoo Choi, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
Cc: linux-pm, imx, linux-arm-kernel, linux-kernel
On Wed, Jul 31, 2024 at 2:13 PM Rob Herring (Arm) <robh@kernel.org> wrote:
>
> Use of_property_present() to test for property presence rather than
> of_get_property(). This is part of a larger effort to remove callers
> of of_get_property() and similar functions. of_get_property() leaks
> the DT property data pointer which is a problem for dynamically
> allocated nodes which may be freed.
>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
> drivers/devfreq/imx-bus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Ping!
>
> diff --git a/drivers/devfreq/imx-bus.c b/drivers/devfreq/imx-bus.c
> index 86850b7dea09..49798f542d68 100644
> --- a/drivers/devfreq/imx-bus.c
> +++ b/drivers/devfreq/imx-bus.c
> @@ -59,7 +59,7 @@ static int imx_bus_init_icc(struct device *dev)
> struct imx_bus *priv = dev_get_drvdata(dev);
> const char *icc_driver_name;
>
> - if (!of_get_property(dev->of_node, "#interconnect-cells", NULL))
> + if (!of_property_present(dev->of_node, "#interconnect-cells"))
> return 0;
> if (!IS_ENABLED(CONFIG_INTERCONNECT_IMX)) {
> dev_warn(dev, "imx interconnect drivers disabled\n");
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] devfreq: imx-bus: Use of_property_present()
2024-07-31 19:12 [PATCH] devfreq: imx-bus: Use of_property_present() Rob Herring (Arm)
2024-08-01 1:50 ` Peng Fan
2024-09-03 19:20 ` Rob Herring
@ 2024-09-04 15:35 ` Chanwoo Choi
2 siblings, 0 replies; 4+ messages in thread
From: Chanwoo Choi @ 2024-09-04 15:35 UTC (permalink / raw)
To: Rob Herring (Arm), MyungJoo Ham, Kyungmin Park, Chanwoo Choi,
Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
Cc: linux-pm, imx, linux-arm-kernel, linux-kernel
24. 8. 1. 04:12에 Rob Herring (Arm) 이(가) 쓴 글:
> Use of_property_present() to test for property presence rather than
> of_get_property(). This is part of a larger effort to remove callers
> of of_get_property() and similar functions. of_get_property() leaks
> the DT property data pointer which is a problem for dynamically
> allocated nodes which may be freed.
>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
> drivers/devfreq/imx-bus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/devfreq/imx-bus.c b/drivers/devfreq/imx-bus.c
> index 86850b7dea09..49798f542d68 100644
> --- a/drivers/devfreq/imx-bus.c
> +++ b/drivers/devfreq/imx-bus.c
> @@ -59,7 +59,7 @@ static int imx_bus_init_icc(struct device *dev)
> struct imx_bus *priv = dev_get_drvdata(dev);
> const char *icc_driver_name;
>
> - if (!of_get_property(dev->of_node, "#interconnect-cells", NULL))
> + if (!of_property_present(dev->of_node, "#interconnect-cells"))
> return 0;
> if (!IS_ENABLED(CONFIG_INTERCONNECT_IMX)) {
> dev_warn(dev, "imx interconnect drivers disabled\n");
I'm sorry for late reply.
Applied it.
--
Best Regards,
Samsung Electronics
Chanwoo Choi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-09-04 15:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-31 19:12 [PATCH] devfreq: imx-bus: Use of_property_present() Rob Herring (Arm)
2024-08-01 1:50 ` Peng Fan
2024-09-03 19:20 ` Rob Herring
2024-09-04 15:35 ` Chanwoo Choi
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).