Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: Chanwoo Choi <chanwoo@kernel.org>
To: "Rob Herring (Arm)" <robh@kernel.org>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>
Cc: linux-pm@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] devfreq: imx-bus: Use of_property_present()
Date: Thu, 5 Sep 2024 00:35:03 +0900	[thread overview]
Message-ID: <d127ba13-cd92-438c-8bf7-f1656a9eadd9@kernel.org> (raw)
In-Reply-To: <20240731191312.1710417-11-robh@kernel.org>

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


      parent reply	other threads:[~2024-09-04 15:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d127ba13-cd92-438c-8bf7-f1656a9eadd9@kernel.org \
    --to=chanwoo@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox