zstd.c (5800571960234f9d1f1011bf135799b2014d4268) zstd.c (d6ebf5286f8f94a254a8c90d4b9f2a8b076a8634)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Cryptographic API.
4 *
5 * Copyright (c) 2017-present, Facebook, Inc.
1/*
2 * Cryptographic API.
3 *
4 * Copyright (c) 2017-present, Facebook, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by
8 * the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
6 */
7#include <linux/crypto.h>
8#include <linux/init.h>
9#include <linux/interrupt.h>
10#include <linux/mm.h>
11#include <linux/module.h>
12#include <linux/net.h>
13#include <linux/vmalloc.h>

--- 187 unchanged lines hidden (view full) ---

201 unsigned int slen, u8 *dst, unsigned int *dlen,
202 void *ctx)
203{
204 return __zstd_decompress(src, slen, dst, dlen, ctx);
205}
206
207static struct crypto_alg alg = {
208 .cra_name = "zstd",
14 */
15#include <linux/crypto.h>
16#include <linux/init.h>
17#include <linux/interrupt.h>
18#include <linux/mm.h>
19#include <linux/module.h>
20#include <linux/net.h>
21#include <linux/vmalloc.h>

--- 187 unchanged lines hidden (view full) ---

209 unsigned int slen, u8 *dst, unsigned int *dlen,
210 void *ctx)
211{
212 return __zstd_decompress(src, slen, dst, dlen, ctx);
213}
214
215static struct crypto_alg alg = {
216 .cra_name = "zstd",
217 .cra_driver_name = "zstd-generic",
209 .cra_flags = CRYPTO_ALG_TYPE_COMPRESS,
210 .cra_ctxsize = sizeof(struct zstd_ctx),
211 .cra_module = THIS_MODULE,
212 .cra_init = zstd_init,
213 .cra_exit = zstd_exit,
214 .cra_u = { .compress = {
215 .coa_compress = zstd_compress,
216 .coa_decompress = zstd_decompress } }

--- 41 unchanged lines hidden ---
218 .cra_flags = CRYPTO_ALG_TYPE_COMPRESS,
219 .cra_ctxsize = sizeof(struct zstd_ctx),
220 .cra_module = THIS_MODULE,
221 .cra_init = zstd_init,
222 .cra_exit = zstd_exit,
223 .cra_u = { .compress = {
224 .coa_compress = zstd_compress,
225 .coa_decompress = zstd_decompress } }

--- 41 unchanged lines hidden ---