[PATCH] fdtdec: drop needlessly convoluted CONFIG_PHANDLE_CHECK_SEQ

Tom Rini trini at konsulko.com
Tue Jun 7 18:47:24 CEST 2022


On Thu, May 19, 2022 at 11:10:43AM +0200, Rasmus Villemoes wrote:

> Asking if the alias we found actually points at the device tree node
> we passed in (in the guise of its offset from blob) can be done simply
> by asking if the fdt_path_offset() of the alias' path is identical to
> offset.
> 
> In fact, the current method suffers from the possibility of false
> negatives: dtc does not necessarily emit a phandle property for a node
> just because it is referenced in /aliases; it only emits a phandle
> property for a node if it is referenced in <angle brackets>
> somewhere. So if both the node we passed in and the alias node we're
> considering don't have phandles, fdt_get_phandle() returns 0 for both.
> 
> Since the proper check is so simple, there's no reason to hide that
> behind a config option (and if one really wanted that, it should be
> called something else because there's no need to involve phandle in
> the check).
> 
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> Acked-by: Aswath Govindraju <a-govindraju at ti.com>

Applied to u-boot/next, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220607/a41c83fc/attachment.sig>


More information about the U-Boot mailing list