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 <[email protected]>
---
 include/bloblist.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/bloblist.h b/include/bloblist.h
index 
ff32d3fecfd4e0474aa4047d1ae6421536570ec6..f999391f74bfd21098198bdd24dbb898a17320fd
 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

-- 
2.34.1

Reply via email to