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 25636A034C; Wed, 23 Feb 2022 08:34:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E617C40DF6; Wed, 23 Feb 2022 08:34:49 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id CB64440140 for ; Wed, 23 Feb 2022 08:34:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645601689; x=1677137689; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=+OtQNlzTw1QT3cogkMcFa2N9rJeNZmWmbiZgkLOqcCc=; b=D2GhJ7CQMae31XEnTHH31o0qECAUUzFr/Pc8Y+0J0b4k4vyMvuoTDjtr 1eKEmRnvFI4119PXWVg8coWgUtVYia8FUFiauQSGGMo0iewp+7OKYqYE/ fzD7d2Uqdvxt4Y6bgMkFCuhbLUtEZxHL+4VrkNQ7fYrGYBcvBw1H/T+lH tYSL/AaTL0Fa2UeRJ8DZUCK4nxxF75HBNzovAnIotzGQMiQywTXRRD4ZN 5h1zjHlYDotIx23Q5m3pmOZg4KxpSwoIuX2ic0zz1bk3Kg+T9ZXgRlJhi nz50vjm/sSTL/c9AIBFtt2G5B356vFAwEy2HGvqLjiMOg7j8JXkt7T/MB w==; X-IronPort-AV: E=McAfee;i="6200,9189,10266"; a="251640710" X-IronPort-AV: E=Sophos;i="5.88,390,1635231600"; d="scan'208";a="251640710" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Feb 2022 23:34:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,390,1635231600"; d="scan'208";a="548126018" Received: from txandevlnx322.an.intel.com ([10.123.117.44]) by orsmga008.jf.intel.com with ESMTP; 22 Feb 2022 23:34:47 -0800 From: Ganapati Kundapura To: jay.jayatheerthan@intel.com, jerinjacobk@gmail.com, abhinandan.gujjar@intel.com, dev@dpdk.org Subject: [PATCH v1] eventdev/crypto_adapter: remove logically dead code Date: Wed, 23 Feb 2022 01:34:43 -0600 Message-Id: <20220223073443.647695-1-ganapati.kundapura@intel.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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 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