From: Evgeny Bachinin Date: Mon, 2 Dec 2024 13:45:22 +0000 (+0300) Subject: sandbox: fix bloblist_finish() linker error if BLOBLIST=n X-Git-Tag: v2025.04-rc1~17^2~39^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5178be68678e0c010cb11d107679aa8ed96e648;p=pandora-u-boot.git sandbox: fix bloblist_finish() linker error if BLOBLIST=n Having CONFIG_OF_EMBED=y && CONFIG_BLOBLIST=n leads to the link error: ``` ld: /tmp/ccwtRVty.ltrans0.ltrans.o: in function `state_uninit': arch/sandbox/cpu/state.c:508: undefined reference to `bloblist_finish' ``` Fixes: 1c52fcca72b ("sandbox: Write out bloblist when exiting") Signed-off-by: Evgeny Bachinin Reviewed-by: Simon Glass --- diff --git a/include/bloblist.h b/include/bloblist.h index ff32d3fecfd..f999391f74b 100644 --- a/include/bloblist.h +++ b/include/bloblist.h @@ -357,6 +357,7 @@ int bloblist_new(ulong addr, uint size, uint flags, uint align_log2); */ int bloblist_check(ulong addr, uint size); +#if CONFIG_IS_ENABLED(BLOBLIST) /** * bloblist_finish() - Set up the bloblist for the next U-Boot part * @@ -366,6 +367,12 @@ int bloblist_check(ulong addr, uint size); * Return: 0 */ int bloblist_finish(void); +#else +static inline int bloblist_finish(void) +{ + return 0; +} +#endif /* BLOBLIST */ /** * bloblist_get_stats() - Get information about the bloblist