From: Chanwoo Choi <cwchoi00@gmail.com>
To: Rob Herring <robh@kernel.org>,
Chanwoo Choi <cw00.choi@samsung.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Alim Akhtar <alim.akhtar@samsung.com>
Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org,
linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PM / devfreq: exynos: Use of_property_present() for testing DT property presence
Date: Mon, 13 Mar 2023 19:39:14 +0900 [thread overview]
Message-ID: <770dde57-20b6-2877-53c6-b7ecf5980090@gmail.com> (raw)
In-Reply-To: <20230310144734.1546726-1-robh@kernel.org>
On 23. 3. 10. 23: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. 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/devfreq/exynos-bus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
> index 027e8f336acc..d341876e7b62 100644
> --- a/drivers/devfreq/exynos-bus.c
> +++ b/drivers/devfreq/exynos-bus.c
> @@ -432,7 +432,7 @@ static int exynos_bus_probe(struct platform_device *pdev)
> goto err;
>
> /* Create child platform device for the interconnect provider */
> - if (of_get_property(dev->of_node, "#interconnect-cells", NULL)) {
> + if (of_property_present(dev->of_node, "#interconnect-cells")) {
> bus->icc_pdev = platform_device_register_data(
> dev, "exynos-generic-icc",
> PLATFORM_DEVID_AUTO, NULL, 0);
Applied it. Thanks.
--
Best Regards,
Samsung Electronics
Chanwoo Choi
prev parent reply other threads:[~2023-03-13 10:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 14:47 [PATCH] PM / devfreq: exynos: Use of_property_present() for testing DT property presence Rob Herring
2023-03-13 10:39 ` 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=770dde57-20b6-2877-53c6-b7ecf5980090@gmail.com \
--to=cwchoi00@gmail.com \
--cc=alim.akhtar@samsung.com \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--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=linux-samsung-soc@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=robh@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;
as well as URLs for NNTP newsgroup(s).