DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1] eventdev/crypto_adapter: remove logically dead code
@ 2022-02-23  7:34 Ganapati Kundapura
  2022-02-23 16:58 ` Jerin Jacob
  2022-02-24  3:11 ` Gujjar, Abhinandan S
  0 siblings, 2 replies; 4+ messages in thread
From: Ganapati Kundapura @ 2022-02-23  7:34 UTC (permalink / raw)
  To: jay.jayatheerthan, jerinjacobk, abhinandan.gujjar, dev

eca_cryptodev_cdev_flush() is internal function and called with
valid range of cdevs.

crypto_cdev_info structure is allocated at adapter creation time
and retrieved from the adapter for a valid cdevs which cannot be NULL
and hence no need for NULL check.

Fixes: 2ae84b39ae7b ("eventdev/crypto: store operations in circular buffer")

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>

diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 0b484f3..f624f50 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -529,10 +529,8 @@ eca_crypto_cdev_flush(struct event_crypto_adapter *adapter,
 	uint16_t qp;
 
 	curr_dev = &adapter->cdevs[cdev_id];
-	if (unlikely(curr_dev == NULL))
-		return 0;
-
 	dev = rte_cryptodev_pmd_get_dev(cdev_id);
+
 	for (qp = 0; qp < dev->data->nb_queue_pairs; qp++) {
 
 		curr_queue = &curr_dev->qpairs[qp];
-- 
2.6.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-24  5:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23  7:34 [PATCH v1] eventdev/crypto_adapter: remove logically dead code Ganapati Kundapura
2022-02-23 16:58 ` Jerin Jacob
2022-02-24  3:11 ` Gujjar, Abhinandan S
2022-02-24  5:22   ` Jerin Jacob

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).