lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <df82b514-e2f7-4edb-b5f3-b91dcb37563a@arm.com>
Date: Tue, 10 Dec 2024 13:37:41 +0000
From: Robin Murphy <robin.murphy@....com>
To: Zijun Hu <zijun_hu@...oud.com>, Rob Herring <robh@...nel.org>
Cc: Saravana Kannan <saravanak@...gle.com>,
 Leif Lindholm <leif.lindholm@...aro.org>,
 Stephen Boyd <stephen.boyd@...aro.org>, Maxime Ripard <mripard@...nel.org>,
 Grant Likely <grant.likely@...retlab.ca>, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org, Zijun Hu <quic_zijuhu@...cinc.com>
Subject: Re: [PATCH 09/10] of: property: Implement
 of_fwnode_property_present() by of_property_present()

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@...oud.com> wrote:
>>>
>>> From: Zijun Hu <quic_zijuhu@...cinc.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ