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]
Date: Tue, 5 Mar 2024 10:46:08 -0800
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Rob Herring <robh+dt@...nel.org>
Cc: Bartosz Golaszewski <brgl@...ev.pl>, Frank Rowand <frowand.list@...il.com>, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org, 
	Bartosz Golaszewski <bartosz.golaszewski@...aro.org>, Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: Re: [PATCH] of: make for_each_property_of_node() available to to !OF

On Tue, 5 Mar 2024 18:56:04 +0100, Rob Herring <robh+dt@...nel.org> said:
>
> Long term, I want to make struct device_node opaque. So if we really
> want to fix this, I think we'd want to convert this to use an iterator
> function. Though I guess any user would be mucking with struct
> property too, so the whole loop would need to be reworked. So in
> conclusion, don't use for_each_property_of_node(). :) Shrug.
>

I basically just need to get the list of all properties of a node. Even just
names. I'm working on a testing driver that needs to request all GPIOs assigned
to it over DT so it must find all `foo-gpios` properties.

How about:

int of_node_for_each_property(struct device_node *dn, int
(*func)(struct property *, void *), void *data)

as the iterator? You didn't say if you want to make struct property opaque as
well but even then it can be used with provided interfaces.

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ