diff options
| author | Richard Genoud <[email protected]> | 2026-03-13 11:42:23 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-03-26 11:04:28 -0600 |
| commit | f0b4f502bdd5f17da58aca9ebf86e16e96e0d347 (patch) | |
| tree | 8386f12bffd2247a63f4fed1005b09fba7004174 | |
| parent | ba7bf918dafcd093ad733b07ba490baeb20cf5da (diff) | |
fs/squashfs: fix sqfs_decompressor.c build in SPL
CONFIG_IS_ENABLED() must be used in place of IS_ENABLED() for config
options that have a _SPL_ counterpart.
Signed-off-by: Richard Genoud <[email protected]>
Reviewed-by: Miquel Raynal <[email protected]>
Reviewed-by: João Marcos Costa <[email protected]>
| -rw-r--r-- | fs/squashfs/sqfs_decompressor.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/fs/squashfs/sqfs_decompressor.c b/fs/squashfs/sqfs_decompressor.c index cfd1153fd74..d54f087274c 100644 --- a/fs/squashfs/sqfs_decompressor.c +++ b/fs/squashfs/sqfs_decompressor.c @@ -10,19 +10,19 @@ #include <stdio.h> #include <stdlib.h> -#if IS_ENABLED(CONFIG_LZO) +#if CONFIG_IS_ENABLED(LZO) #include <linux/lzo.h> #endif -#if IS_ENABLED(CONFIG_ZLIB) +#if CONFIG_IS_ENABLED(ZLIB) #include <u-boot/zlib.h> #endif -#if IS_ENABLED(CONFIG_LZ4) +#if CONFIG_IS_ENABLED(LZ4) #include <u-boot/lz4.h> #endif -#if IS_ENABLED(CONFIG_ZSTD) +#if CONFIG_IS_ENABLED(ZSTD) #include <linux/zstd.h> #endif @@ -34,19 +34,19 @@ int sqfs_decompressor_init(struct squashfs_ctxt *ctxt) u16 comp_type = get_unaligned_le16(&ctxt->sblk->compression); switch (comp_type) { -#if IS_ENABLED(CONFIG_LZO) +#if CONFIG_IS_ENABLED(LZO) case SQFS_COMP_LZO: break; #endif -#if IS_ENABLED(CONFIG_ZLIB) +#if CONFIG_IS_ENABLED(ZLIB) case SQFS_COMP_ZLIB: break; #endif -#if IS_ENABLED(CONFIG_LZ4) +#if CONFIG_IS_ENABLED(LZ4) case SQFS_COMP_LZ4: break; #endif -#if IS_ENABLED(CONFIG_ZSTD) +#if CONFIG_IS_ENABLED(ZSTD) case SQFS_COMP_ZSTD: ctxt->zstd_workspace = malloc(zstd_dctx_workspace_bound()); if (!ctxt->zstd_workspace) @@ -66,19 +66,19 @@ void sqfs_decompressor_cleanup(struct squashfs_ctxt *ctxt) u16 comp_type = get_unaligned_le16(&ctxt->sblk->compression); switch (comp_type) { -#if IS_ENABLED(CONFIG_LZO) +#if CONFIG_IS_ENABLED(LZO) case SQFS_COMP_LZO: break; #endif -#if IS_ENABLED(CONFIG_ZLIB) +#if CONFIG_IS_ENABLED(ZLIB) case SQFS_COMP_ZLIB: break; #endif -#if IS_ENABLED(CONFIG_LZ4) +#if CONFIG_IS_ENABLED(LZ4) case SQFS_COMP_LZ4: break; #endif -#if IS_ENABLED(CONFIG_ZSTD) +#if CONFIG_IS_ENABLED(ZSTD) case SQFS_COMP_ZSTD: free(ctxt->zstd_workspace); break; @@ -86,7 +86,7 @@ void sqfs_decompressor_cleanup(struct squashfs_ctxt *ctxt) } } -#if IS_ENABLED(CONFIG_ZLIB) +#if CONFIG_IS_ENABLED(ZLIB) static void zlib_decompression_status(int ret) { switch (ret) { @@ -103,7 +103,7 @@ static void zlib_decompression_status(int ret) } #endif -#if IS_ENABLED(CONFIG_ZSTD) +#if CONFIG_IS_ENABLED(ZSTD) static int sqfs_zstd_decompress(struct squashfs_ctxt *ctxt, void *dest, unsigned long dest_len, void *source, u32 src_len) { @@ -129,7 +129,7 @@ int sqfs_decompress(struct squashfs_ctxt *ctxt, void *dest, int ret = 0; switch (comp_type) { -#if IS_ENABLED(CONFIG_LZO) +#if CONFIG_IS_ENABLED(LZO) case SQFS_COMP_LZO: { size_t lzo_dest_len = *dest_len; ret = lzo1x_decompress_safe(source, src_len, dest, &lzo_dest_len); @@ -141,7 +141,7 @@ int sqfs_decompress(struct squashfs_ctxt *ctxt, void *dest, break; } #endif -#if IS_ENABLED(CONFIG_ZLIB) +#if CONFIG_IS_ENABLED(ZLIB) case SQFS_COMP_ZLIB: ret = uncompress(dest, dest_len, source, src_len); if (ret) { @@ -151,7 +151,7 @@ int sqfs_decompress(struct squashfs_ctxt *ctxt, void *dest, break; #endif -#if IS_ENABLED(CONFIG_LZ4) +#if CONFIG_IS_ENABLED(LZ4) case SQFS_COMP_LZ4: ret = LZ4_decompress_safe(source, dest, src_len, *dest_len); if (ret < 0) { @@ -162,7 +162,7 @@ int sqfs_decompress(struct squashfs_ctxt *ctxt, void *dest, ret = 0; break; #endif -#if IS_ENABLED(CONFIG_ZSTD) +#if CONFIG_IS_ENABLED(ZSTD) case SQFS_COMP_ZSTD: ret = sqfs_zstd_decompress(ctxt, dest, *dest_len, source, src_len); if (ret) { |
