From: Robin Murphy <robin.murphy@arm.com>
To: Zijun Hu <zijun_hu@icloud.com>, Rob Herring <robh@kernel.org>
Cc: Saravana Kannan <saravanak@google.com>,
Leif Lindholm <leif.lindholm@linaro.org>,
Stephen Boyd <stephen.boyd@linaro.org>,
Maxime Ripard <mripard@kernel.org>,
Grant Likely <grant.likely@secretlab.ca>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Zijun Hu <quic_zijuhu@quicinc.com>
Subject: Re: [PATCH 09/10] of: property: Implement of_fwnode_property_present() by of_property_present()
Date: Tue, 10 Dec 2024 13:37:41 +0000 [thread overview]
Message-ID: <df82b514-e2f7-4edb-b5f3-b91dcb37563a@arm.com> (raw)
In-Reply-To: <dc989762-d868-44ff-968c-6d7be19e41cf@icloud.com>
On 2024-12-10 12:44 pm, Zijun Hu wrote:
> On 2024/12/10 00:48, Rob Herring wrote:
>> On Thu, Dec 5, 2024 at 6:54 PM Zijun Hu <zijun_hu@icloud.com> wrote:
>>>
>>> From: Zijun Hu <quic_zijuhu@quicinc.com>
>>>
>>> of_property_read_bool() is deprecated for non-boolean property, but
>>> of_fwnode_property_present() still uses it.
>>>
>>> Fix by using of_property_present() instead of of_property_read_bool().
>>
>> of_property_present() just calls of_property_read_bool(). For now. I'm
>> working on making using of_property_read_bool() on non-boolean a
>> warning. No point in this change until that happens.
>>
>
> what about below idea?
>
> replace all of_property_read_bool() usages with of_property_present()
> then remove the former.
No, the whole reason of_property_present() was added in the first place
is because reading the effective "value" of a boolean property is a
semantically different operation from checking whether a property of any
type exists. Therefore (ab)using a single function for both purposes,
whichever way round, is not an ideal API design. The fact that they both
happen to share the same implementation at the moment is, as Rob says,
not something we want to be tied to forever.
Thanks,
Robin.
next prev parent reply other threads:[~2024-12-10 13:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-06 0:52 [PATCH 00/10] of: fix bugs and improve codes Zijun Hu
2024-12-06 0:52 ` [PATCH 01/10] of: Fix alias name length calculating error in API of_find_node_opts_by_path() Zijun Hu
2024-12-09 13:24 ` Rob Herring
2024-12-09 13:31 ` Zijun Hu
2024-12-06 0:52 ` [PATCH 02/10] of: Correct return value for API of_parse_phandle_with_args_map() Zijun Hu
2024-12-09 13:26 ` Rob Herring
2024-12-06 0:52 ` [PATCH 03/10] of: Correct child specifier used as input of the 2nd nexus node Zijun Hu
2024-12-06 0:52 ` [PATCH 04/10] of: Fix refcount leakage for OF node returned by __of_get_dma_parent() Zijun Hu
2024-12-09 20:32 ` Rob Herring
2024-12-06 0:52 ` [PATCH 05/10] of: Fix available buffer size calculating error in API of_device_uevent_modalias() Zijun Hu
2024-12-09 20:34 ` Rob Herring
2024-12-10 12:39 ` Zijun Hu
2024-12-10 14:10 ` Rob Herring
2024-12-11 11:44 ` Zijun Hu
2024-12-06 0:52 ` [PATCH 06/10] of/fdt: Dump __be32 array in CPU type order in of_dump_addr() Zijun Hu
2024-12-09 20:37 ` Rob Herring
2024-12-06 0:52 ` [PATCH 07/10] of: Correct comments for of_alias_scan() Zijun Hu
2024-12-09 13:20 ` Rob Herring
2024-12-09 13:41 ` Zijun Hu
2024-12-06 0:52 ` [PATCH 08/10] of: Swap implementation between of_property_present() and of_property_read_bool() Zijun Hu
2024-12-06 0:52 ` [PATCH 09/10] of: property: Implement of_fwnode_property_present() by of_property_present() Zijun Hu
2024-12-09 16:48 ` Rob Herring
2024-12-10 12:44 ` Zijun Hu
2024-12-10 13:37 ` Robin Murphy [this message]
2024-12-06 0:52 ` [PATCH 10/10] of: Simplify API of_find_node_with_property() implementation Zijun Hu
2024-12-09 20:38 ` Rob Herring
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=df82b514-e2f7-4edb-b5f3-b91dcb37563a@arm.com \
--to=robin.murphy@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@secretlab.ca \
--cc=leif.lindholm@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=quic_zijuhu@quicinc.com \
--cc=robh@kernel.org \
--cc=saravanak@google.com \
--cc=stephen.boyd@linaro.org \
--cc=zijun_hu@icloud.com \
/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