Skip to contentSkip to conversation

lz4: Do not disable LZ4_decompress_safe* for xPL

PATCH In review Tom Rini 1 participant 2 messages Oct 1, 2025 – Oct 11, 2025 Library code

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 lz4: Do not disable LZ4_decompress_safe* for xPL

We should compile the LZ4_decompress_safe and LZ4_decompress_safe_partial functions in SPL and they will be discarded if unused.

---
 lib/lz4.c | 2 --
 1 file changed, 2 deletions(-)
lib/lz4.c +0 -2
index c718659c590a..11b4a4d334be 100644
@@ -526,7 +526,6 @@ _output_error:
 	return (int) (-(((const char *)ip) - src)) - 1;
 }
 
-#ifndef CONFIG_SPL_BUILD
 __rcode int LZ4_decompress_safe(const char *source, char *dest,
 				int compressedSize, int maxDecompressedSize)
 {
@@ -545,4 +544,3 @@ __rcode int LZ4_decompress_safe_partial(const char *src, char *dst,
 				      endOnInputSize, partial_decode,
 				      noDict, (BYTE *)dst, NULL, 0);
 }
-#endif
Signature · 1 line
2.43.0
author
#1 lore raw
Quoted 5 lines · Tom Rini

We should compile the LZ4_decompress_safe and LZ4_decompress_safe_partial functions in SPL and they will be discarded if unused.

Applied to u-boot/master, thanks!

[1/1] lz4: Do not disable LZ4_decompress_safe* for xPL

      commit: dde1515be5e2f6fdf3429b0d6d5ad6fa80e7715e
Signature · 1 line
Tom