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: <6f6a0ade-09fd-49eb-a8ae-ac8849b8ce92@gmail.com>
Date: Tue, 8 Apr 2025 13:42:12 +0300
From: Matti Vaittinen <mazziesaccount@...il.com>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
 Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
 Paul Elder <paul.elder@...asonboard.com>,
 Mauro Carvalho Chehab <mchehab@...nel.org>, linux-media@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] media: i2c: thp7312: use fwnode_for_each_child_node()

On 08/04/2025 13:36, Sakari Ailus wrote:
> Hei Laurent, Matti,
> 
> On Tue, Apr 08, 2025 at 01:26:42PM +0300, Matti Vaittinen wrote:
>> On 08/04/2025 13:12, Laurent Pinchart wrote:
>>> Hi Sakari,
>>>
>>> On Tue, Apr 08, 2025 at 08:48:45AM +0000, Sakari Ailus wrote:
>>>> On Fri, Mar 21, 2025 at 12:41:00PM +0200, Laurent Pinchart wrote:
>>>>> On Fri, Mar 21, 2025 at 10:58:27AM +0200, Matti Vaittinen wrote:
>>>>>> When fwnode_for_each_available_child_node() is used on the device-tree
>>>>>> backed systems, it renders to same operation as the
>>>>>> fwnode_for_each_child_node(), because the fwnode_for_each_child_node()
>>>>>> does only iterate through those device-tree nodes which are available.
>>>>>
>>>>> This makes me wonder why the OF backend implements
>>>>> fwnode_for_each_child_node() as fwnode_for_each_available_child_node().
>>>>> Is that on purpose, or is it a bug ?
>>>>
>>>> I discussed this with Rafael and he didn't recall why the original
>>>> implementation was like that. The general direction later on has been not
>>>> to present unavailable nodes over the fwnode interface.
>>>>
>>>> So I'd say:
>>>>
>>>> Reviewed-by: Sakari Ailus <sakari.ailus@...ux.intel.com>
>>>>
>>>> We should also change the documentation of the fwnode API accordingly.
>>>
>>> Does that also mean that the fwnode_for_each_available_child_node()
>>> function will be dropped ? It's used by few drivers (5 in addition to
>>> the thp7312 driver, plus 3 call sites in drivers/base/core.c), so a
>>> patch series to drop it should be easy.
>>>
>>
>> I assume the fwnode_for_each_available_child_node() still makes sense for
>> ACPI backed users, no?
> 
> Not really (see my earlier explanation in
> <Z9mQPJwnKAkPHriT@...konen.localdomain>).

I capture that the _named_ available nodes don't have value as ACPI 
names aren't really what is expected by the _named_ callers. What I 
didn't pick is that the fwnode_for_each_available_child_node() - which 
should iterate all available child nodes ignoring the name - wouldn't be 
useful.

> I think all the *available* stuff
> should be removed from include/linux/property.h, apart from
> fwnode_device_is_availble(), which should be turned to work on struct
> device to signal its availability for device nodes only.

I am not saying I have any understanding of the uses of the 
'unavailable' nodes. As such I am not arguing over what you say here :)

Yours,
	-- Matti


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ