From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DA5124253E; Fri, 8 Sep 2023 07:40:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ABA6B4067A; Fri, 8 Sep 2023 07:40:10 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id D24A7402EC for ; Fri, 8 Sep 2023 07:40:09 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3880afPu005194; Thu, 7 Sep 2023 22:40:08 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=k/9vxkYjNWjZP3OARcHwK0S6Dq7eqqFtYjDfnAH24sU=; b=EthVFBa05Q5KQU9tK1Go7ogH0dfSHIErp3x+aDohRiCToHKMcreRYcGhiCC8MnnAje8N M1NPlXbVsQwJd6ItcxYZELnw3oOHzpLp+t5/ScGqX6hCumo0P8ajqZVLQoYwem58Ghvc 3r/SqP9JjLGZzCQn/qs8hgvp2rTYKF//A7BplvYU3uTN8HcsW49F/2x3AyASLEIn8sZ0 exGwI5Hgu2X3y4NyH+x0TRluo1ufDKWj80Jh8XXC6K0r8hwjMeXY7XcidHMbO0Ra8QbF 2Bfwuwvm8grASEhZN+z/1ow8MuMosTQUiU5JGy7c3kqslE7adh4Vp8x2Nj0cKvSAIpXz 2g== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3sxu7cqyp0-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 07 Sep 2023 22:40:08 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 7 Sep 2023 22:40:06 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 7 Sep 2023 22:40:06 -0700 Received: from BG-LT92004.corp.innovium.com (unknown [10.28.163.189]) by maili.marvell.com (Postfix) with ESMTP id F3F875B692E; Thu, 7 Sep 2023 22:40:04 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Ciara Power CC: Jerin Jacob , Subject: [PATCH 2/4] test/crypto: remove redundant cast Date: Fri, 8 Sep 2023 11:10:01 +0530 Message-ID: <20230908054003.295-2-anoobj@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230908054003.295-1-anoobj@marvell.com> References: <20230908054003.295-1-anoobj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: 211FjVooDaOe_oYzWmh0g3pQmiH64TRO X-Proofpoint-ORIG-GUID: 211FjVooDaOe_oYzWmh0g3pQmiH64TRO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-08_03,2023-09-05_01,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The API 'rte_cryptodev_get_sec_ctx' returns void *. Type cast is not required. Signed-off-by: Anoob Joseph --- app/test/test_cryptodev.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index fb2af40b99..589b9860ce 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -8920,15 +8920,12 @@ security_proto_supported(enum rte_security_session_action_type action, enum rte_security_session_protocol proto) { struct crypto_testsuite_params *ts_params = &testsuite_params; - const struct rte_security_capability *capabilities; const struct rte_security_capability *capability; + struct rte_security_ctx *ctx; uint16_t i = 0; - struct rte_security_ctx *ctx = (struct rte_security_ctx *) - rte_cryptodev_get_sec_ctx( - ts_params->valid_devs[0]); - + ctx = rte_cryptodev_get_sec_ctx(ts_params->valid_devs[0]); capabilities = rte_security_capabilities_get(ctx); @@ -8967,12 +8964,12 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc, struct crypto_unittest_params *ut_params = &unittest_params; uint8_t *plaintext; int ret = TEST_SUCCESS; - struct rte_security_ctx *ctx = (struct rte_security_ctx *) - rte_cryptodev_get_sec_ctx( - ts_params->valid_devs[0]); struct rte_cryptodev_info dev_info; + struct rte_security_ctx *ctx; uint64_t feat_flags; + ctx = rte_cryptodev_get_sec_ctx(ts_params->valid_devs[0]); + rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); feat_flags = dev_info.feature_flags; @@ -9174,11 +9171,11 @@ test_pdcp_proto_SGL(int i, int oop, unsigned int trn_data = 0; struct rte_cryptodev_info dev_info; uint64_t feat_flags; - struct rte_security_ctx *ctx = (struct rte_security_ctx *) - rte_cryptodev_get_sec_ctx( - ts_params->valid_devs[0]); + struct rte_security_ctx *ctx; struct rte_mbuf *temp_mbuf; + ctx = rte_cryptodev_get_sec_ctx(ts_params->valid_devs[0]); + rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); feat_flags = dev_info.feature_flags; @@ -10898,6 +10895,7 @@ test_docsis_proto_uplink(const void *data) const struct docsis_test_data *d_td = data; struct crypto_testsuite_params *ts_params = &testsuite_params; struct crypto_unittest_params *ut_params = &unittest_params; + struct rte_security_ctx *ctx; uint8_t *plaintext = NULL; uint8_t *ciphertext = NULL; uint8_t *iv_ptr; @@ -10905,9 +10903,7 @@ test_docsis_proto_uplink(const void *data) uint32_t crc_data_len; int ret = TEST_SUCCESS; - struct rte_security_ctx *ctx = (struct rte_security_ctx *) - rte_cryptodev_get_sec_ctx( - ts_params->valid_devs[0]); + ctx = rte_cryptodev_get_sec_ctx(ts_params->valid_devs[0]); /* Verify the capabilities */ struct rte_security_capability_idx sec_cap_idx; @@ -11083,15 +11079,14 @@ test_docsis_proto_downlink(const void *data) const struct docsis_test_data *d_td = data; struct crypto_testsuite_params *ts_params = &testsuite_params; struct crypto_unittest_params *ut_params = &unittest_params; + struct rte_security_ctx *ctx; uint8_t *plaintext = NULL; uint8_t *ciphertext = NULL; uint8_t *iv_ptr; int32_t cipher_len, crc_len; int ret = TEST_SUCCESS; - struct rte_security_ctx *ctx = (struct rte_security_ctx *) - rte_cryptodev_get_sec_ctx( - ts_params->valid_devs[0]); + ctx = rte_cryptodev_get_sec_ctx(ts_params->valid_devs[0]); /* Verify the capabilities */ struct rte_security_capability_idx sec_cap_idx; -- 2.25.1