From: Frank Rowand Date: Thu, 24 Jan 2019 23:22:14 +0000 (-0800) Subject: of: unittest: add caution to function header comment X-Git-Tag: v5.1-rc1~81^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=89716dc353bdf1ab34c3a41d3f157ce28b4fbe7d;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Rob Herring --- diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 3249fe259d308..872956500c276 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -1127,7 +1127,11 @@ static void update_node_properties(struct device_node *np, /** * attach_node_and_children - attaches nodes - * and its children to live tree + * and its children to live tree. + * CAUTION: misleading function name - if node @np already exists in + * the live tree then children of @np are *not* attached to the live + * tree. This works for the current test devicetree nodes because such + * nodes do not have child nodes. * * @np: Node to attach to live tree */