]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
crypto: hisilicon/sec - remove unused parameter
authorWenkai Lin <linwenkai6@hisilicon.com>
Fri, 26 Jan 2024 09:38:28 +0000 (17:38 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 2 Feb 2024 10:10:05 +0000 (18:10 +0800)
Unused parameter of static functions should be removed.

Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/sec2/sec_crypto.c

index f7e2ba0bf160464c706c13f37967a5677a9be2fd..93a972fcbf6386e5d27a33940650e3b9816e3c52 100644 (file)
@@ -485,8 +485,7 @@ static void sec_alg_resource_free(struct sec_ctx *ctx,
                sec_free_mac_resource(dev, qp_ctx->res);
 }
 
-static int sec_alloc_qp_ctx_resource(struct hisi_qm *qm, struct sec_ctx *ctx,
-                                    struct sec_qp_ctx *qp_ctx)
+static int sec_alloc_qp_ctx_resource(struct sec_ctx *ctx, struct sec_qp_ctx *qp_ctx)
 {
        u16 q_depth = qp_ctx->qp->sq_depth;
        struct device *dev = ctx->dev;
@@ -541,8 +540,7 @@ static void sec_free_qp_ctx_resource(struct sec_ctx *ctx, struct sec_qp_ctx *qp_
        kfree(qp_ctx->req_list);
 }
 
-static int sec_create_qp_ctx(struct hisi_qm *qm, struct sec_ctx *ctx,
-                            int qp_ctx_id, int alg_type)
+static int sec_create_qp_ctx(struct sec_ctx *ctx, int qp_ctx_id)
 {
        struct sec_qp_ctx *qp_ctx;
        struct hisi_qp *qp;
@@ -561,7 +559,7 @@ static int sec_create_qp_ctx(struct hisi_qm *qm, struct sec_ctx *ctx,
        idr_init(&qp_ctx->req_idr);
        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)
                goto err_destroy_idr;
 
@@ -614,7 +612,7 @@ static int sec_ctx_base_init(struct sec_ctx *ctx)
        }
 
        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)
                        goto err_sec_release_qp_ctx;
        }
@@ -750,9 +748,7 @@ static void sec_skcipher_uninit(struct crypto_skcipher *tfm)
        sec_ctx_base_uninit(ctx);
 }
 
-static int sec_skcipher_3des_setkey(struct crypto_skcipher *tfm, const u8 *key,
-                                   const u32 keylen,
-                                   const enum sec_cmode c_mode)
+static int sec_skcipher_3des_setkey(struct crypto_skcipher *tfm, const u8 *key, const u32 keylen)
 {
        struct sec_ctx *ctx = crypto_skcipher_ctx(tfm);
        struct sec_cipher_ctx *c_ctx = &ctx->c_ctx;
@@ -843,7 +839,7 @@ static int sec_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key,
 
        switch (c_alg) {
        case SEC_CALG_3DES:
-               ret = sec_skcipher_3des_setkey(tfm, key, keylen, c_mode);
+               ret = sec_skcipher_3des_setkey(tfm, key, keylen);
                break;
        case SEC_CALG_AES:
        case SEC_CALG_SM4: