Skip to contentSkip to conversation

of: unittest: Remove redundant OF_DETACHED flag setting

PATCH Applied Stephen Boyd 3 participants 3 messages Oct 13, 2017 – Oct 16, 2017 Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: unittest: Remove redundant OF_DETACHED flag setting

of_fdt_unflatten_tree() already sets the flag on the node to OF_DETACHED, because of_fdt_unflatten_tree() calls __unflatten_device_tree() with the detached bool set to true.

---
 drivers/of/unittest.c | 2 --
 1 file changed, 2 deletions(-)
drivers/of/unittest.c +0 -2
index 35bf9617ae59..8795478a4754 100644
@@ -1112,7 +1112,6 @@ static int __init unittest_data_add(void)
 		pr_warn("%s: No tree to attach; not running tests\n", __func__);
 		return -ENODATA;
 	}
-	of_node_set_flag(unittest_data_node, OF_DETACHED);
 	rc = of_resolve_phandles(unittest_data_node);
 	if (rc) {
 		pr_err("%s: Failed to resolve phandles (rc=%i)\n", __func__, rc);
@@ -2262,7 +2261,6 @@ static int __init overlay_data_add(int onum)
 		ret = 0;
 		goto out_free_data;
 	}
-	of_node_set_flag(info->np_overlay, OF_DETACHED);
 
 	ret = of_resolve_phandles(info->np_overlay);
 	if (ret) {
Signature · 6 lines
2.14.GIT

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reviewed-by on v1 1/1
#1 lore raw
Quoted 23 lines · Stephen Boyd

of_fdt_unflatten_tree() already sets the flag on the node to OF_DETACHED, because of_fdt_unflatten_tree() calls __unflatten_device_tree() with the detached bool set to true.

---
 drivers/of/unittest.c | 2 --
 1 file changed, 2 deletions(-)
drivers/of/unittest.c +0 -1
index 35bf9617ae59..8795478a4754 100644
@@ -1112,7 +1112,6 @@ static int __init unittest_data_add(void)
 		pr_warn("%s: No tree to attach; not running tests\n", __func__);
 		return -ENODATA;
 	}
-	of_node_set_flag(unittest_data_node, OF_DETACHED);
 	rc = of_resolve_phandles(unittest_data_node);
 	if (rc) {
 		pr_err("%s: Failed to resolve phandles (rc=%i)\n", __func__, rc);

drivers/of/unittest.c static int __init overlay_data_add(int onum) · line 2266

Quoted 7 lines
drivers/of/unittest.c +0 -1
@@ -2262,7 +2261,6 @@ static int __init overlay_data_add(int onum)
 		ret = 0;
 		goto out_free_data;
 	}
-	of_node_set_flag(info->np_overlay, OF_DETACHED);
 
 	ret = of_resolve_phandles(info->np_overlay);
 	if (ret) {

Should be no conflict with my patch series "[PATCH 00/12] of: overlay: clean up device tree overlay code" [1], just a line offset.

[1] https://lkml.org/lkml/2017/10/2/679

maintainer Applied
#2 lore raw
In reply to Stephen Boyd
Quoted 8 lines · Stephen Boyd

of_fdt_unflatten_tree() already sets the flag on the node to OF_DETACHED, because of_fdt_unflatten_tree() calls __unflatten_device_tree() with the detached bool set to true.

---
 drivers/of/unittest.c | 2 --
 1 file changed, 2 deletions(-)

Applied.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html