[PATCH 2/4] image: fit: Improve functions description comments

Massimo Pegorer massimo.pegorer+oss at gmail.com
Sat Sep 16 10:23:44 CEST 2023


Load and entry addresses are returned in ulong variables, which are
32 or 64 bit depending on architecture. Specify that on failure these
functions do not set memory pointed by load / entry argument: this
detail is relavant for correct functions usage.

Signed-off-by: Massimo Pegorer <massimo.pegorer+oss at gmail.com>
---
 boot/image-fit.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/boot/image-fit.c b/boot/image-fit.c
index 3cc556b727..7e87a513e7 100644
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -869,10 +869,11 @@ static int fit_image_get_address(const void *fit, int noffset, char *name,
  * fit_image_get_load() - get load addr property for given component image node
  * @fit: pointer to the FIT format image header
  * @noffset: component image node offset
- * @load: pointer to the uint32_t, will hold load address
+ * @load: pointer to ulong, will hold load address
  *
  * fit_image_get_load() finds load address property in a given component
  * image node. If the property is found, its value is returned to the caller.
+ * Otherwise, on failure, *load will be left untouched.
  *
  * returns:
  *     0, on success
@@ -887,14 +888,11 @@ int fit_image_get_load(const void *fit, int noffset, ulong *load)
  * fit_image_get_entry() - get entry point address property
  * @fit: pointer to the FIT format image header
  * @noffset: component image node offset
- * @entry: pointer to the uint32_t, will hold entry point address
- *
- * This gets the entry point address property for a given component image
- * node.
+ * @entry: pointer to ulong, will hold entry point address
  *
  * fit_image_get_entry() finds entry point address property in a given
- * component image node.  If the property is found, its value is returned
- * to the caller.
+ * component image node. If the property is found, its value is returned
+ * to the caller. Otherwise, on failure, *entry will be left untouched.
  *
  * returns:
  *     0, on success
-- 
2.34.1



More information about the U-Boot mailing list