Attention is currently required from: Jakub Czapiga, Julius Werner, Martin L Roth.
Maximilian Brune has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81081?usp=email )
Change subject: lib/device_tree: Add some FDT helper functions ......................................................................
Patch Set 18:
(1 comment)
File src/lib/device_tree.c:
https://review.coreboot.org/c/coreboot/+/81081/comment/7f1877c2_71e2abd4 : PS18, Line 175: ""
Look at `dt_find_node()` which really does exactly the same thing, I think it works very cleanly. […]
`dt_find_node` and `fdt_find_node` work inherently different. `dt_find_node` always finds a node relative to a parent node. `fdt_find_node` always finds a node relative to another node on the same level (for performance reasons). I cannot add a ``` if (!*path) return parent; ``` first thing in the `fdt_find_node` function like is done in `dt_find_node`, because when you call `fdt_find_node` you don't have the offset to the parent anymore. `node_offset` does not point to the parent. `fdt_find_node` is meant to be an internal function (therefore static). It implements the most performant approach of finding a node relative to another node, but is never meant to be called directly by code outside of `device_tree.c`.
I may be missing something, but this is my current understanding.