DPDK patches and discussions
 help / color / mirror / Atom feed
From: Zhiyong Yang <zhiyong.yang@intel.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, thomas@monjalon.net, stable@dpdk.org,
	declan.doherty@intel.com, akhil.goyal@nxp.com,
	Zhiyong Yang <zhiyong.yang@intel.com>
Subject: [dpdk-dev] [PATCH] lib: fix wrong cast
Date: Tue, 23 Jan 2018 17:48:13 +0800	[thread overview]
Message-ID: <20180123094813.65813-1-zhiyong.yang@intel.com> (raw)

The wrong casts don't cause actual error, but they should conform to C
standard.

Fixes: c261d1431bd8 ("security: introduce security API and framework")
Fixes: b3bbd9e5f265 ("cryptodev: support device independent sessions")
Cc: stable@dpdk.org
Cc: declan.doherty@intel.com
Cc: akhil.goyal@nxp.com

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
 lib/librte_cryptodev/rte_cryptodev.c | 2 +-
 lib/librte_security/rte_security.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 7726d15f4..8745b6b02 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1094,7 +1094,7 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
 	struct rte_cryptodev_sym_session *sess;
 
 	/* Allocate a session structure from the session pool */
-	if (rte_mempool_get(mp, (void *)&sess)) {
+	if (rte_mempool_get(mp, (void **)&sess)) {
 		CDEV_LOG_ERR("couldn't get object from session mempool");
 		return NULL;
 	}
diff --git a/lib/librte_security/rte_security.c b/lib/librte_security/rte_security.c
index 6461dba05..d98f46dea 100644
--- a/lib/librte_security/rte_security.c
+++ b/lib/librte_security/rte_security.c
@@ -49,7 +49,7 @@ rte_security_session_create(struct rte_security_ctx *instance,
 
 	RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->session_create, NULL);
 
-	if (rte_mempool_get(mp, (void *)&sess))
+	if (rte_mempool_get(mp, (void **)&sess))
 		return NULL;
 
 	if (instance->ops->session_create(instance->device, conf, sess, mp)) {
-- 
2.13.3

             reply	other threads:[~2018-01-23  9:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23  9:48 Zhiyong Yang [this message]
2018-01-23  9:59 ` Akhil Goyal
2018-01-23 15:31 ` [dpdk-dev] [dpdk-stable] " De Lara Guarch, Pablo
2018-01-23 15:39   ` De Lara Guarch, Pablo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180123094813.65813-1-zhiyong.yang@intel.com \
    --to=zhiyong.yang@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).