提交 1c8c93f6 编写于 作者: W Wenkai Lin 提交者: JiangShui

crypto: hisilicon/sec - remove unused parameter

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7BANJ
CVE: NA

----------------------------------------------------------------------

Unused parameter of static functions should be removed.
Signed-off-by: NWenkai Lin <linwenkai6@hisilicon.com>
Signed-off-by: NJiangShui Yang <yangjiangshui@h-partners.com>
上级 519457c4
...@@ -482,8 +482,7 @@ static void sec_alg_resource_free(struct sec_ctx *ctx, ...@@ -482,8 +482,7 @@ static void sec_alg_resource_free(struct sec_ctx *ctx,
sec_free_mac_resource(dev, qp_ctx->res); sec_free_mac_resource(dev, qp_ctx->res);
} }
static int sec_alloc_qp_ctx_resource(struct hisi_qm *qm, struct sec_ctx *ctx, static int sec_alloc_qp_ctx_resource(struct sec_ctx *ctx, struct sec_qp_ctx *qp_ctx)
struct sec_qp_ctx *qp_ctx)
{ {
u16 q_depth = qp_ctx->qp->sq_depth; u16 q_depth = qp_ctx->qp->sq_depth;
struct device *dev = ctx->dev; struct device *dev = ctx->dev;
...@@ -538,8 +537,7 @@ static void sec_free_qp_ctx_resource(struct sec_ctx *ctx, struct sec_qp_ctx *qp_ ...@@ -538,8 +537,7 @@ static void sec_free_qp_ctx_resource(struct sec_ctx *ctx, struct sec_qp_ctx *qp_
kfree(qp_ctx->req_list); kfree(qp_ctx->req_list);
} }
static int sec_create_qp_ctx(struct hisi_qm *qm, struct sec_ctx *ctx, static int sec_create_qp_ctx(struct sec_ctx *ctx, int qp_ctx_id)
int qp_ctx_id, int alg_type)
{ {
struct sec_qp_ctx *qp_ctx; struct sec_qp_ctx *qp_ctx;
struct hisi_qp *qp; struct hisi_qp *qp;
...@@ -558,7 +556,7 @@ static int sec_create_qp_ctx(struct hisi_qm *qm, struct sec_ctx *ctx, ...@@ -558,7 +556,7 @@ static int sec_create_qp_ctx(struct hisi_qm *qm, struct sec_ctx *ctx,
idr_init(&qp_ctx->req_idr); idr_init(&qp_ctx->req_idr);
INIT_LIST_HEAD(&qp_ctx->backlog); INIT_LIST_HEAD(&qp_ctx->backlog);
ret = sec_alloc_qp_ctx_resource(qm, ctx, qp_ctx); ret = sec_alloc_qp_ctx_resource(ctx, qp_ctx);
if (ret) if (ret)
goto err_destroy_idr; goto err_destroy_idr;
...@@ -611,7 +609,7 @@ static int sec_ctx_base_init(struct sec_ctx *ctx) ...@@ -611,7 +609,7 @@ static int sec_ctx_base_init(struct sec_ctx *ctx)
} }
for (i = 0; i < sec->ctx_q_num; i++) { for (i = 0; i < sec->ctx_q_num; i++) {
ret = sec_create_qp_ctx(&sec->qm, ctx, i, 0); ret = sec_create_qp_ctx(ctx, i);
if (ret) if (ret)
goto err_sec_release_qp_ctx; goto err_sec_release_qp_ctx;
} }
...@@ -747,9 +745,7 @@ static void sec_skcipher_uninit(struct crypto_skcipher *tfm) ...@@ -747,9 +745,7 @@ static void sec_skcipher_uninit(struct crypto_skcipher *tfm)
sec_ctx_base_uninit(ctx); sec_ctx_base_uninit(ctx);
} }
static int sec_skcipher_3des_setkey(struct crypto_skcipher *tfm, const u8 *key, static int sec_skcipher_3des_setkey(struct crypto_skcipher *tfm, const u8 *key, const u32 keylen)
const u32 keylen,
const enum sec_cmode c_mode)
{ {
struct sec_ctx *ctx = crypto_skcipher_ctx(tfm); struct sec_ctx *ctx = crypto_skcipher_ctx(tfm);
struct sec_cipher_ctx *c_ctx = &ctx->c_ctx; struct sec_cipher_ctx *c_ctx = &ctx->c_ctx;
...@@ -840,7 +836,7 @@ static int sec_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key, ...@@ -840,7 +836,7 @@ static int sec_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key,
switch (c_alg) { switch (c_alg) {
case SEC_CALG_3DES: case SEC_CALG_3DES:
ret = sec_skcipher_3des_setkey(tfm, key, keylen, c_mode); ret = sec_skcipher_3des_setkey(tfm, key, keylen);
break; break;
case SEC_CALG_AES: case SEC_CALG_AES:
case SEC_CALG_SM4: case SEC_CALG_SM4:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册