dm: core: Clarify behaviour of ofnode_name_eq()

This function is somewhat ambiguous, so expand the comments and add a
test for the undefined behaviour.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-01-10 17:00:27 -07:00
committed by Tom Rini
parent d5bc5c6cb0
commit ff698f2ddb
2 changed files with 5 additions and 4 deletions

View File

@@ -186,6 +186,8 @@ static int dm_test_compare_node_name(struct unit_test_state *uts)
ut_assert(ofnode_valid(node));
ut_assert(ofnode_name_eq(node, "mmio-bus"));
ut_assert(!ofnode_name_eq(node, "mmio-bus@0"));
return 0;
}
DM_TEST(dm_test_compare_node_name, UTF_SCAN_PDATA);