From 530cc4797faebbab2284fd3bddf37f975a3f40f7 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 18 Nov 2023 14:04:57 -0700 Subject: image: Tidy up genimg_get_kernel_addr_fit() This function does not modify its first argument, so mark it const. Also move the comments to the header file and expand them to provide more useful information. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- boot/bootm.c | 3 +-- boot/image-board.c | 17 +---------------- 2 files changed, 2 insertions(+), 18 deletions(-) (limited to 'boot') diff --git a/boot/bootm.c b/boot/bootm.c index 598f880d86d..e323c8b758e 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -122,8 +122,7 @@ static const void *boot_get_kernel(struct cmd_tbl *cmdtp, int flag, int argc, #endif ulong img_addr; const void *buf; - const char *fit_uname_config = NULL; - const char *fit_uname_kernel = NULL; + const char *fit_uname_config = NULL, *fit_uname_kernel = NULL; #if CONFIG_IS_ENABLED(FIT) int os_noffset; #endif diff --git a/boot/image-board.c b/boot/image-board.c index d500da1b4b9..062c76badec 100644 --- a/boot/image-board.c +++ b/boot/image-board.c @@ -198,22 +198,7 @@ void memmove_wd(void *to, void *from, size_t len, ulong chunksz) } } -/** - * genimg_get_kernel_addr_fit - get the real kernel address and return 2 - * FIT strings - * @img_addr: a string might contain real image address - * @fit_uname_config: double pointer to a char, will hold pointer to a - * configuration unit name - * @fit_uname_kernel: double pointer to a char, will hold pointer to a subimage - * name - * - * genimg_get_kernel_addr_fit get the real kernel start address from a string - * which is normally the first argv of bootm/bootz - * - * returns: - * kernel start address - */ -ulong genimg_get_kernel_addr_fit(char * const img_addr, +ulong genimg_get_kernel_addr_fit(const char *const img_addr, const char **fit_uname_config, const char **fit_uname_kernel) { -- cgit v1.3.1