• Home
  • Raw
  • Download

Lines Matching refs:ctx

42 static int deflate_comp_init(struct deflate_ctx *ctx, int format)  in deflate_comp_init()  argument
45 struct z_stream_s *stream = &ctx->comp_stream; in deflate_comp_init()
71 static int deflate_decomp_init(struct deflate_ctx *ctx, int format) in deflate_decomp_init() argument
74 struct z_stream_s *stream = &ctx->decomp_stream; in deflate_decomp_init()
96 static void deflate_comp_exit(struct deflate_ctx *ctx) in deflate_comp_exit() argument
98 zlib_deflateEnd(&ctx->comp_stream); in deflate_comp_exit()
99 vfree(ctx->comp_stream.workspace); in deflate_comp_exit()
102 static void deflate_decomp_exit(struct deflate_ctx *ctx) in deflate_decomp_exit() argument
104 zlib_inflateEnd(&ctx->decomp_stream); in deflate_decomp_exit()
105 vfree(ctx->decomp_stream.workspace); in deflate_decomp_exit()
108 static int __deflate_init(void *ctx, int format) in __deflate_init() argument
112 ret = deflate_comp_init(ctx, format); in __deflate_init()
115 ret = deflate_decomp_init(ctx, format); in __deflate_init()
117 deflate_comp_exit(ctx); in __deflate_init()
124 struct deflate_ctx *ctx; in gen_deflate_alloc_ctx() local
127 ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); in gen_deflate_alloc_ctx()
128 if (!ctx) in gen_deflate_alloc_ctx()
131 ret = __deflate_init(ctx, format); in gen_deflate_alloc_ctx()
133 kfree(ctx); in gen_deflate_alloc_ctx()
137 return ctx; in gen_deflate_alloc_ctx()
152 struct deflate_ctx *ctx = crypto_tfm_ctx(tfm); in deflate_init() local
154 return __deflate_init(ctx, 0); in deflate_init()
157 static void __deflate_exit(void *ctx) in __deflate_exit() argument
159 deflate_comp_exit(ctx); in __deflate_exit()
160 deflate_decomp_exit(ctx); in __deflate_exit()
163 static void deflate_free_ctx(struct crypto_scomp *tfm, void *ctx) in deflate_free_ctx() argument
165 __deflate_exit(ctx); in deflate_free_ctx()
166 kfree_sensitive(ctx); in deflate_free_ctx()
171 struct deflate_ctx *ctx = crypto_tfm_ctx(tfm); in deflate_exit() local
173 __deflate_exit(ctx); in deflate_exit()
177 u8 *dst, unsigned int *dlen, void *ctx) in __deflate_compress() argument
180 struct deflate_ctx *dctx = ctx; in __deflate_compress()
215 void *ctx) in deflate_scompress() argument
217 return __deflate_compress(src, slen, dst, dlen, ctx); in deflate_scompress()
221 u8 *dst, unsigned int *dlen, void *ctx) in __deflate_decompress() argument
225 struct deflate_ctx *dctx = ctx; in __deflate_decompress()
271 void *ctx) in deflate_sdecompress() argument
273 return __deflate_decompress(src, slen, dst, dlen, ctx); in deflate_sdecompress()