summaryrefslogtreecommitdiff
path: root/crypto/lz4.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2025-03-09 10:43:14 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2025-03-15 16:21:22 +0800
commit0af7304c0696ec5b3589af6973b7f27e014c2903 (patch)
treed335ef2fefeca83816c686d64aaf9a796e99ac8d /crypto/lz4.c
parent3d6979bf3bd51f47e889327e10e4653d55168c21 (diff)
crypto: scomp - Remove tfm argument from alloc/free_ctx
The tfm argument is completely unused and meaningless as the same stream object is identical over all transforms of a given algorithm. Remove it. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/lz4.c')
-rw-r--r--crypto/lz4.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/lz4.c b/crypto/lz4.c
index 0606f8862e78..e66c6d1ba34f 100644
--- a/crypto/lz4.c
+++ b/crypto/lz4.c
@@ -16,7 +16,7 @@ struct lz4_ctx {
void *lz4_comp_mem;
};
-static void *lz4_alloc_ctx(struct crypto_scomp *tfm)
+static void *lz4_alloc_ctx(void)
{
void *ctx;
@@ -31,14 +31,14 @@ static int lz4_init(struct crypto_tfm *tfm)
{
struct lz4_ctx *ctx = crypto_tfm_ctx(tfm);
- ctx->lz4_comp_mem = lz4_alloc_ctx(NULL);
+ ctx->lz4_comp_mem = lz4_alloc_ctx();
if (IS_ERR(ctx->lz4_comp_mem))
return -ENOMEM;
return 0;
}
-static void lz4_free_ctx(struct crypto_scomp *tfm, void *ctx)
+static void lz4_free_ctx(void *ctx)
{
vfree(ctx);
}
@@ -47,7 +47,7 @@ static void lz4_exit(struct crypto_tfm *tfm)
{
struct lz4_ctx *ctx = crypto_tfm_ctx(tfm);
- lz4_free_ctx(NULL, ctx->lz4_comp_mem);
+ lz4_free_ctx(ctx->lz4_comp_mem);
}
static int __lz4_compress_crypto(const u8 *src, unsigned int slen,