Re: [U-Boot] [PATCH PATCH v6 08/13] spl: fit: constify the output parameter of spl_fit_get_image_name()

2020-01-08 Thread Tom Rini
On Tue, Oct 22, 2019 at 04:39:17PM +0200, Jean-Jacques Hiblot wrote:

> There is no need for it to be non-constant. Making it constant, allows to
> return constant string without warning.
> 
> Signed-off-by: Jean-Jacques Hiblot 
> Reviewed-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: PGP signature


[U-Boot] [PATCH PATCH v6 08/13] spl: fit: constify the output parameter of spl_fit_get_image_name()

2019-10-22 Thread Jean-Jacques Hiblot
There is no need for it to be non-constant. Making it constant, allows to
return constant string without warning.

Signed-off-by: Jean-Jacques Hiblot 
Reviewed-by: Simon Glass 
---

Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 common/spl/spl_fit.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index 5aeb9528fe..9001731303 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -46,7 +46,7 @@ __weak ulong board_spl_fit_size_align(ulong size)
  */
 static int spl_fit_get_image_name(const void *fit, int images,
  const char *type, int index,
- char **outname)
+ const char **outname)
 {
const char *name, *str;
__maybe_unused int node;
@@ -101,7 +101,7 @@ static int spl_fit_get_image_name(const void *fit, int 
images,
 static int spl_fit_get_image_node(const void *fit, int images,
  const char *type, int index)
 {
-   char *str;
+   const char *str;
int err;
int node;
 
@@ -387,7 +387,7 @@ static int spl_fit_record_loadable(const void *fit, int 
images, int index,
 {
int ret = 0;
 #if !CONFIG_IS_ENABLED(FIT_IMAGE_TINY)
-   char *name;
+   const char *name;
int node;
 
ret = spl_fit_get_image_name(fit, images, "loadables",
-- 
2.17.1

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot