diff options
author | Simon Glass <sjg@chromium.org> | 2022-09-07 05:27:32 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-09-30 05:43:43 +0300 |
commit | 0b58eaa89c4d7a4aea1f7f63ff4aca2c2f1d90c4 (patch) | |
tree | 2cfa68b6cbd711ec4ec34e92aa1320930e6a8fd4 /doc/develop | |
parent | 0d63213c1ed5246423c22cbe3c6798a09763a2b9 (diff) | |
download | u-boot-0b58eaa89c4d7a4aea1f7f63ff4aca2c2f1d90c4.tar.xz |
dm: core: Allow copying ofnode property data when writing
At present ofnode_write_prop() is inconsistent between livetree and
flattree, in that livetree requires the caller to ensure the property
value is stable (e.g. in rodata or allocated) but flattree does not, since
it makes a copy.
This makes the API call a bit painful to use, since the caller must do
different things depending on OF_LIVE.
Add a new 'copy' argument which tells the function to make a copy if
needed. Add some tests to cover this behaviour.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc/develop')
-rw-r--r-- | doc/develop/driver-model/livetree.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/develop/driver-model/livetree.rst b/doc/develop/driver-model/livetree.rst index 65b88f854e..55aa3eac92 100644 --- a/doc/develop/driver-model/livetree.rst +++ b/doc/develop/driver-model/livetree.rst @@ -325,3 +325,5 @@ Live tree support was introduced in U-Boot 2017.07. Some possible enhancements are: - support for livetree in SPL and before relocation (if desired) +- freeing leaked memory caused by writing new nodes / property values to the + livetree (ofnode_write_prop()) |