aboutsummaryrefslogtreecommitdiff
path: root/test/dm
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-09-26 08:14:37 -0600
committerTom Rini <trini@konsulko.com>2023-10-06 14:38:12 -0400
commit247970978d3de3e46537550e83137df586d9dee9 (patch)
tree75dfa574c3b4042a9875a0513485805d313055e5 /test/dm
parenta17e1e76c8984396b82b2b20a1bf9d4e7160182a (diff)
downloadu-boot-247970978d3de3e46537550e83137df586d9dee9.zip
u-boot-247970978d3de3e46537550e83137df586d9dee9.tar.gz
u-boot-247970978d3de3e46537550e83137df586d9dee9.tar.bz2
dm: core: Reverse the argument order in ofnode_copy_props()
Follow the order used by memcpy() as it may be less confusing. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm')
-rw-r--r--test/dm/ofnode.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c
index d71faac..dee71ee 100644
--- a/test/dm/ofnode.c
+++ b/test/dm/ofnode.c
@@ -1209,12 +1209,11 @@ static int dm_test_ofnode_too_many(struct unit_test_state *uts)
}
DM_TEST(dm_test_ofnode_too_many, UT_TESTF_SCAN_FDT);
-static int check_copy_props(struct unit_test_state *uts, ofnode src,
- ofnode dst)
+static int check_copy_props(struct unit_test_state *uts, ofnode dst, ofnode src)
{
u32 reg[2], val;
- ut_assertok(ofnode_copy_props(src, dst));
+ ut_assertok(ofnode_copy_props(dst, src));
ut_assertok(ofnode_read_u32(dst, "ping-expect", &val));
ut_asserteq(3, val);
@@ -1246,7 +1245,7 @@ static int dm_test_ofnode_copy_props(struct unit_test_state *uts)
src = ofnode_path("/b-test");
dst = ofnode_path("/some-bus");
- ut_assertok(check_copy_props(uts, src, dst));
+ ut_assertok(check_copy_props(uts, dst, src));
/* check a property that is in the destination already */
ut_asserteq_str("mux0", ofnode_read_string(dst, "mux-control-names"));
@@ -1262,7 +1261,7 @@ static int dm_test_ofnode_copy_props_ot(struct unit_test_state *uts)
src = ofnode_path("/b-test");
dst = oftree_path(otree, "/node/subnode2");
- ut_assertok(check_copy_props(uts, src, dst));
+ ut_assertok(check_copy_props(uts, dst, src));
return 0;
}