On Thu, 24 Sep 2020 at 09:26, Patrick Delaunay <patrick.delau...@st.com> wrote: > > Update the test for node.of_offset because an invalid offset is not > always set to -1 because the return value of the libfdt functions are: > + an error with a value < 0 > + a valid offset with value >=0 > > For example, in ofnode_get_by_phandle() function, we have: > node.of_offset = fdt_node_offset_by_phandle(gd->fdt_blob, phandle); > and this function can return -FDT_ERR_BADPHANDLE (-6). > > Without this patch, the added test dm_test_ofnode_get_by_phandle failed. > > Signed-off-by: Patrick Delaunay <patrick.delau...@st.com> > --- > > include/dm/ofnode.h | 2 +- > test/dm/ofnode.c | 16 ++++++++++++++++ > 2 files changed, 17 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass <s...@chromium.org> Applied to u-boot-dm/next, thanks!