projects
/
platform
/
kernel
/
linux-rpi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/kernel/linux-rpi.git]
/
crypto
/
zstd.c
diff --git
a/crypto/zstd.c
b/crypto/zstd.c
index
1a3309f
..
154a969
100644
(file)
--- a/
crypto/zstd.c
+++ b/
crypto/zstd.c
@@
-18,22
+18,22
@@
#define ZSTD_DEF_LEVEL 3
struct zstd_ctx {
#define ZSTD_DEF_LEVEL 3
struct zstd_ctx {
-
ZSTD_CC
tx *cctx;
-
ZSTD_DC
tx *dctx;
+
zstd_cc
tx *cctx;
+
zstd_dc
tx *dctx;
void *cwksp;
void *dwksp;
};
void *cwksp;
void *dwksp;
};
-static
ZSTD
_parameters zstd_params(void)
+static
zstd
_parameters zstd_params(void)
{
{
- return
ZSTD_getParams(ZSTD_DEF_LEVEL, 0
, 0);
+ return
zstd_get_params(ZSTD_DEF_LEVEL
, 0);
}
static int zstd_comp_init(struct zstd_ctx *ctx)
{
int ret = 0;
}
static int zstd_comp_init(struct zstd_ctx *ctx)
{
int ret = 0;
- const
ZSTD
_parameters params = zstd_params();
- const size_t wksp_size =
ZSTD_CCtxWorkspaceBound(
params.cParams);
+ const
zstd
_parameters params = zstd_params();
+ const size_t wksp_size =
zstd_cctx_workspace_bound(&
params.cParams);
ctx->cwksp = vzalloc(wksp_size);
if (!ctx->cwksp) {
ctx->cwksp = vzalloc(wksp_size);
if (!ctx->cwksp) {
@@
-41,7
+41,7
@@
static int zstd_comp_init(struct zstd_ctx *ctx)
goto out;
}
goto out;
}
- ctx->cctx =
ZSTD_initCC
tx(ctx->cwksp, wksp_size);
+ ctx->cctx =
zstd_init_cc
tx(ctx->cwksp, wksp_size);
if (!ctx->cctx) {
ret = -EINVAL;
goto out_free;
if (!ctx->cctx) {
ret = -EINVAL;
goto out_free;
@@
-56,7
+56,7
@@
out_free:
static int zstd_decomp_init(struct zstd_ctx *ctx)
{
int ret = 0;
static int zstd_decomp_init(struct zstd_ctx *ctx)
{
int ret = 0;
- const size_t wksp_size =
ZSTD_DCtxWorkspaceB
ound();
+ const size_t wksp_size =
zstd_dctx_workspace_b
ound();
ctx->dwksp = vzalloc(wksp_size);
if (!ctx->dwksp) {
ctx->dwksp = vzalloc(wksp_size);
if (!ctx->dwksp) {
@@
-64,7
+64,7
@@
static int zstd_decomp_init(struct zstd_ctx *ctx)
goto out;
}
goto out;
}
- ctx->dctx =
ZSTD_initDC
tx(ctx->dwksp, wksp_size);
+ ctx->dctx =
zstd_init_dc
tx(ctx->dwksp, wksp_size);
if (!ctx->dctx) {
ret = -EINVAL;
goto out_free;
if (!ctx->dctx) {
ret = -EINVAL;
goto out_free;
@@
-152,10
+152,10
@@
static int __zstd_compress(const u8 *src, unsigned int slen,
{
size_t out_len;
struct zstd_ctx *zctx = ctx;
{
size_t out_len;
struct zstd_ctx *zctx = ctx;
- const
ZSTD
_parameters params = zstd_params();
+ const
zstd
_parameters params = zstd_params();
- out_len =
ZSTD_compressCCtx(zctx->cctx, dst, *dlen, src, slen,
params);
- if (
ZSTD_isE
rror(out_len))
+ out_len =
zstd_compress_cctx(zctx->cctx, dst, *dlen, src, slen, &
params);
+ if (
zstd_is_e
rror(out_len))
return -EINVAL;
*dlen = out_len;
return 0;
return -EINVAL;
*dlen = out_len;
return 0;
@@
-182,8
+182,8
@@
static int __zstd_decompress(const u8 *src, unsigned int slen,
size_t out_len;
struct zstd_ctx *zctx = ctx;
size_t out_len;
struct zstd_ctx *zctx = ctx;
- out_len =
ZSTD_decompressDC
tx(zctx->dctx, dst, *dlen, src, slen);
- if (
ZSTD_isE
rror(out_len))
+ out_len =
zstd_decompress_dc
tx(zctx->dctx, dst, *dlen, src, slen);
+ if (
zstd_is_e
rror(out_len))
return -EINVAL;
*dlen = out_len;
return 0;
return -EINVAL;
*dlen = out_len;
return 0;