From e470c940f6cb6cfff4b27d595ec651a3c1c2cc15 Mon Sep 17 00:00:00 2001 From: Cyber Knight Date: Mon, 7 Mar 2022 11:55:33 +0800 Subject: [PATCH] [contrib][linux] Fix a warning in zstd_reset_cstream() - This fixes the below warning: ../lib/zstd/zstd_compress_module.c: In function 'zstd_reset_cstream': ../lib/zstd/zstd_compress_module.c:136:9: warning: 'ZSTD_resetCStream' is deprecated [-Wdeprecated-declarations] 136 | return ZSTD_resetCStream(cstream, pledged_src_size); | ^~~~~~ In file included from ../include/linux/zstd.h:26, from ../lib/zstd/zstd_compress_module.c:15: ../include/linux/zstd_lib.h:2277:8: note: declared here 2277 | size_t ZSTD_resetCStream(ZSTD_CStream* zcs, unsigned long long pledgedSrcSize); | ^~~~~~~~~~~~~~~~~ ZSTD_resetCstream is deprecated and zstd_CCtx_reset is suggested to use hence let's switch to it. Signed-off-by: Cyber Knight --- contrib/linux-kernel/zstd_compress_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/linux-kernel/zstd_compress_module.c b/contrib/linux-kernel/zstd_compress_module.c index 65548a4bb..7b25be6e3 100644 --- a/contrib/linux-kernel/zstd_compress_module.c +++ b/contrib/linux-kernel/zstd_compress_module.c @@ -133,7 +133,7 @@ EXPORT_SYMBOL(zstd_init_cstream); size_t zstd_reset_cstream(zstd_cstream *cstream, unsigned long long pledged_src_size) { - return ZSTD_resetCStream(cstream, pledged_src_size); + return ZSTD_CCtx_reset(cstream, pledged_src_size); } EXPORT_SYMBOL(zstd_reset_cstream);