summaryrefslogtreecommitdiff
path: root/include/dm
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-07-30 15:52:07 -0600
committerTom Rini <trini@konsulko.com>2022-08-12 08:14:23 -0400
commit72b338aa2cd4afff8e92ab28199bc2db073cfea7 (patch)
treeef3330fd92fb137089563680907562a4989d15a5 /include/dm
parent5063ced278e0093bdf926bc832a804f09fd3bd66 (diff)
downloadu-boot-72b338aa2cd4afff8e92ab28199bc2db073cfea7.tar.gz
dm: core: Add a note about how livetree updates work
The unflattening algorithm results in a single block of memory being allocated for the whole tree. When writing new properties, these are allocated new memory outside that block. When the block is freed, the allocated properties remain. Document how this works and the potential memory leak, as well as mentioning that updating the livetree is actually supported now. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm')
-rw-r--r--include/dm/ofnode.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index 346b09c7d9..5a5309d79a 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -1081,7 +1081,8 @@ int ofnode_device_is_compatible(ofnode node, const char *compat);
* ofnode_write_prop() - Set a property of a ofnode
*
* Note that the value passed to the function is *not* allocated by the
- * function itself, but must be allocated by the caller if necessary.
+ * function itself, but must be allocated by the caller if necessary. However
+ * it does allocate memory for the property struct and name.
*
* @node: The node for whose property should be set
* @propname: The name of the property to set