Skip to contentSkip to conversation

of: unittest: fix an error test in of_unittest_overlay_8()

PATCH Applied Dan Carpenter 3 participants 4 messages Mar 7, 2018 – Mar 8, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: unittest: fix an error test in of_unittest_overlay_8()

We changed this from of_overlay_apply() to overlay_data_apply(). The overlay_data_apply() function returns 1 on success and 0 on error so the check for less than zero needs to be updated.

Fixes 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT")
drivers/of/unittest.c +1 -2
index ca5e86dadae2..b233f170b2ec 100644
@@ -1666,8 +1666,7 @@ static void __init of_unittest_overlay_8(void)
 
 		overlay_name = overlay_name_from_nr(overlay_nr + i);
 
-		ret = overlay_data_apply(overlay_name, &ovcs_id);
-		if (ret < 0)  {
+		if (!overlay_data_apply(overlay_name, &ovcs_id)) {
 			unittest(0, "could not apply overlay \"%s\"\n",
 					overlay_name);
 			return;
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Dan Carpenter

We changed this from of_overlay_apply() to overlay_data_apply(). The overlay_data_apply() function returns 1 on success and 0 on error so the check for less than zero needs to be updated.

Fixes 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT")
drivers/of/unittest.c +0 -0
index ca5e86dadae2..b233f170b2ec 100644

drivers/of/unittest.c static void __init of_unittest_overlay_8(void) · line 1672

Quoted 9 lines
drivers/of/unittest.c +1 -2
@@ -1666,8 +1666,7 @@ static void __init of_unittest_overlay_8(void)
 
 		overlay_name = overlay_name_from_nr(overlay_nr + i);
 
-		ret = overlay_data_apply(overlay_name, &ovcs_id);
-		if (ret < 0)  {
+		if (!overlay_data_apply(overlay_name, &ovcs_id)) {
 			unittest(0, "could not apply overlay \"%s\"\n",
 					overlay_name);
 			return;

Thank you.

Reviewed-by
#2 lore raw
Quoted 26 lines · Frank Rowand
Quoted 13 lines · Dan Carpenter

We changed this from of_overlay_apply() to overlay_data_apply(). The overlay_data_apply() function returns 1 on success and 0 on error so the check for less than zero needs to be updated.

Fixes 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT")
drivers/of/unittest.c +0 -0
index ca5e86dadae2..b233f170b2ec 100644

drivers/of/unittest.c static void __init of_unittest_overlay_8(void) · line 1672

Quoted 9 lines
drivers/of/unittest.c +1 -2
@@ -1666,8 +1666,7 @@ static void __init of_unittest_overlay_8(void)
 
 		overlay_name = overlay_name_from_nr(overlay_nr + i);
 
-		ret = overlay_data_apply(overlay_name, &ovcs_id);
-		if (ret < 0)  {
+		if (!overlay_data_apply(overlay_name, &ovcs_id)) {
 			unittest(0, "could not apply overlay \"%s\"\n",
 					overlay_name);
 			return;

Thank you.

Quoted 1 line

sony.com is valid, but that should have been:

maintainer Applied
#3 lore raw
In reply to Dan Carpenter
Quoted 6 lines · Dan Carpenter

We changed this from of_overlay_apply() to overlay_data_apply(). The overlay_data_apply() function returns 1 on success and 0 on error so the check for less than zero needs to be updated.

Fixes 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT")

Applied, thanks.

Rob