Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4382694rdb; Thu, 28 Dec 2023 22:46:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IHOHGUMBFxKF4VNdoK18KljY1XWUbIwITwZfEa2EbvVaIP6i+WsujLkA/qho8OrZRYtL86C X-Received: by 2002:a05:6a20:37a5:b0:196:45e5:6094 with SMTP id q37-20020a056a2037a500b0019645e56094mr2096990pze.85.1703832362740; Thu, 28 Dec 2023 22:46:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703832362; cv=none; d=google.com; s=arc-20160816; b=jCGyjtoghUB7s69wFmso7USv1zg73lfMri3s60zzQJ/kK2AoYg5q59qtDMannnLSgI V7MIxOL2Jt/zUt/rwkTFiiC+vr2+iS5eTepDRtuQnD6/Xk7JYubyPIzcV0Bvxdblu5iL n32SC8+GTyOy1c8je3H0PkrMgxNNCdGMVOPMEDTu9vpR/G3vuIGS/PttSe9sJ3Op4e4A 675v/j1EjxOa+y3eZzQicwVgDgaIrS/TmKpJzegPaCoqScsrG3hGCZ1mvKLnS2kt4VHT t6aDLtWJk4SzPWvS1oKBmVdx+uipWgaWRss5emwMtAcOyAJlY3X6DWBepNthHccb4YcY aRdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=aJra9RKufK1c3ZgrZHBNxApmCeCebjiRA3YfcSj/dfs=; fh=wxe9XR9VLnk0wQjyl0lDu7hTfgxy++r9V/gF2e7GfkU=; b=Q6saW1xD8AaQcjkjphBRuDhDAuITkGjFeRuLq9vmSRr/yQms201i+NvD5qaqY34AdR dZzEFF9c3OcwkyuGGRBQkjxjzQ1KHxsk0+QtythdL3ukauUGHChf4SXutb/wystAC8q9 0FwwCr2cjzc55i5nN+fBZHfa1Afcdx7yBOCpIdTjevrFFQI/zA0uJO33897kDdZ9iHRN n1EciL69LNyVOCqAhe+7Un4h4xOtKg4Gy2DcfeBBUQXvcko+vLrW067psT+mWJzuzg5e nmAmxNQWeKforgpme1FNFoRDgV/0wvyj7+G/TRYD3PBHL5HiHVse5hTEmofhl2eJ7XBL MPYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-1091-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1091-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id oc9-20020a17090b1c0900b0028caac94a0dsi1357232pjb.84.2023.12.28.22.46.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 22:46:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-1091-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-1091-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1091-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 595D1282B94 for ; Fri, 29 Dec 2023 06:46:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E86237493; Fri, 29 Dec 2023 06:45:31 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00CBF7472; Fri, 29 Dec 2023 06:45:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4T1bTz35djz1vqcK; Fri, 29 Dec 2023 14:45:11 +0800 (CST) Received: from dggpeml500001.china.huawei.com (unknown [7.185.36.227]) by mail.maildlp.com (Postfix) with ESMTPS id 359C01A0197; Fri, 29 Dec 2023 14:45:07 +0800 (CST) Received: from huawei.com (10.69.192.56) by dggpeml500001.china.huawei.com (7.185.36.227) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 29 Dec 2023 14:44:52 +0800 From: Qi Tao To: , , CC: , Subject: [PATCH 4/4] crypto: hisilicon/sec - remove unused parameter Date: Fri, 29 Dec 2023 14:44:21 +0800 Message-ID: <20231229064421.16981-5-taoqi10@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20231229064421.16981-1-taoqi10@huawei.com> References: <20231229064421.16981-1-taoqi10@huawei.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500001.china.huawei.com (7.185.36.227) From: Wenkai Lin Unused parameter of static functions should be removed. Signed-off-by: Wenkai Lin --- drivers/crypto/hisilicon/sec2/sec_crypto.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/crypto/hisilicon/sec2/sec_crypto.c b/drivers/crypto/hisilicon/sec2/sec_crypto.c index 5d4facf62c86..ee6cc2e483ab 100644 --- a/drivers/crypto/hisilicon/sec2/sec_crypto.c +++ b/drivers/crypto/hisilicon/sec2/sec_crypto.c @@ -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: -- 2.33.0