Attention is currently required from: Julius Werner, Yu-Ping Wu.
Douglas Anderson has posted comments on this change by Julius Werner. ( https://review.coreboot.org/c/coreboot/+/85964?usp=email )
Change subject: commonlib/device_tree: Return cells properties of parent node ......................................................................
Patch Set 1:
(1 comment)
File src/commonlib/device_tree.c:
https://review.coreboot.org/c/coreboot/+/85964/comment/4738e88e_20346c4f?usp... : PS1, Line 1061: It worries me at least slightly that if a caller directly calls the base case (AKA path points to an array that is just [NULL]) that `addrcp` and `sizecp` will never be filled in. Does this ever happen? Is it worth adding a wrapper to ensure that someone directly calls the function with the base case that `addrcp` and `sizecp` are NULL, otherwise we return an error (or at least print a warning?)
Even better would be if we could somehow reach into our parent and read the properties from there, but looks like this structure doesn't have pointers back to the parent...
...or maybe this doesn't matter since the caller would need to handle someone forgetting `#address-cells` and `#size-cells` anyway?