diff options
author | Athira Rajeev <atrajeev@linux.vnet.ibm.com> | 2023-09-14 22:02:04 +0530 |
---|---|---|
committer | Reza Arbab <arbab@linux.ibm.com> | 2023-09-15 12:59:35 -0500 |
commit | f6434d0961f793836fb06a0434e3608d9ac9ff00 (patch) | |
tree | 1723bfce951abc2d06f9eb076ebd120d04afa982 /opal-ci | |
parent | 23c01ab3eb4cf0d4487d548257f330d19bef3188 (diff) | |
download | skiboot-f6434d0961f793836fb06a0434e3608d9ac9ff00.zip skiboot-f6434d0961f793836fb06a0434e3608d9ac9ff00.tar.gz skiboot-f6434d0961f793836fb06a0434e3608d9ac9ff00.tar.bz2 |
core/device: Add function to return child node using name at substring "@"
Add a function dt_find_by_name_before_addr() that returns the child node if
it matches till first occurrence at "@" of a given name, otherwise NULL.
This is helpful for cases with node name like: "name@addr". In
scenarios where nodes are added with "name@addr" format and if the
value of "addr" is not known, that node can't be matched with node
name or addr. Hence matching with substring as node name will return
the expected result. Patch adds dt_find_by_name_before_addr() function
and testcase for the same in core/test/run-device.c
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Reviewed-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
[arbab: Refactor the loop to fix possible memory leak]
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Diffstat (limited to 'opal-ci')
0 files changed, 0 insertions, 0 deletions