Skip to content

Commit 89716dc

Browse files
frowandrobherring
authored andcommitted
of: unittest: add caution to function header comment
Name of function attach_node_and_children() is misleading because if the node already exists in the livetree then only the node's properties are attached. This works for the existing test data, but add comment warning of this misleading name. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
1 parent fd25ffd commit 89716dc

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎drivers/of/unittest.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,11 @@ static void update_node_properties(struct device_node *np,
11271127

11281128
/**
11291129
* attach_node_and_children - attaches nodes
1130-
* and its children to live tree
1130+
* and its children to live tree.
1131+
* CAUTION: misleading function name - if node @np already exists in
1132+
* the live tree then children of @np are *not* attached to the live
1133+
* tree. This works for the current test devicetree nodes because such
1134+
* nodes do not have child nodes.
11311135
*
11321136
* @np: Node to attach to live tree
11331137
*/

0 commit comments

Comments
 (0)