[1/4] security: remove redundant cast

Message ID 20230908054003.295-1-anoobj@marvell.com (mailing list archive)
State Not Applicable, archived
Delegated to: akhil goyal
Headers
Series [1/4] security: remove redundant cast |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Anoob Joseph Sept. 8, 2023, 5:40 a.m. UTC
  The API 'rte_cryptodev_get_sec_ctx' returns void *. Type cast is not
required.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 lib/security/rte_security.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Power, Ciara Sept. 8, 2023, 10:36 a.m. UTC | #1
> -----Original Message-----
> From: Anoob Joseph <anoobj@marvell.com>
> Sent: Friday, September 8, 2023 6:40 AM
> To: Akhil Goyal <gakhil@marvell.com>; Power, Ciara <ciara.power@intel.com>
> Cc: Jerin Jacob <jerinj@marvell.com>; dev@dpdk.org
> Subject: [PATCH 1/4] security: remove redundant cast
> 
> The API 'rte_cryptodev_get_sec_ctx' returns void *. Type cast is not required.
> 
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> ---
>  lib/security/rte_security.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Hi Anoob,
Series-Acked-by: Ciara Power <ciara.power@intel.com>
  
Akhil Goyal Sept. 20, 2023, 11:18 a.m. UTC | #2
> Subject: [PATCH 1/4] security: remove redundant cast
> 
> The API 'rte_cryptodev_get_sec_ctx' returns void *. Type cast is not
> required.
> 
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> ---
The changes in the series are part of 
https://patches.dpdk.org/project/dpdk/patch/20230920104000.2868230-1-gakhil@marvell.com/

Hence dropping this series.
  

Patch

diff --git a/lib/security/rte_security.c b/lib/security/rte_security.c
index c4d64bb8e9..71910863bc 100644
--- a/lib/security/rte_security.c
+++ b/lib/security/rte_security.c
@@ -385,7 +385,7 @@  security_capabilities_from_dev_id(int dev_id, const void **caps)
 	if (rte_cryptodev_is_valid_dev(dev_id) == 0)
 		return -EINVAL;
 
-	sec_ctx = (struct rte_security_ctx *)rte_cryptodev_get_sec_ctx(dev_id);
+	sec_ctx = rte_cryptodev_get_sec_ctx(dev_id);
 	RTE_PTR_OR_ERR_RET(sec_ctx, -EINVAL);
 
 	capabilities = rte_security_capabilities_get(sec_ctx);