diff mbox series

[U-Boot,v3,11/12] spl: fit: constify the output parameter of spl_fit_get_image_name()

Message ID 20190523103912.3790-12-jjhiblot@ti.com
State Superseded
Delegated to: Tom Rini
Headers show
Series Add support for applications of overlays in SPL | expand

Commit Message

Jean-Jacques Hiblot May 23, 2019, 10:39 a.m. UTC
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 <jjhiblot@ti.com>
---

Changes in v3: None
Changes in v2: None

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

Comments

Simon Glass June 22, 2019, 7:09 p.m. UTC | #1
On Thu, 23 May 2019 at 11:39, Jean-Jacques Hiblot <jjhiblot@ti.com> 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 <jjhiblot@ti.com>
> ---
>
> Changes in v3: None
> Changes in v2: None
>
>  common/spl/spl_fit.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index d772f2db64..8c5d15c3c8 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -39,7 +39,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;
@@ -94,7 +94,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;
 
@@ -363,7 +363,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",