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 65E05A0540; Thu, 7 Jul 2022 01:43:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7749542B7C; Thu, 7 Jul 2022 01:42:52 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 114F042829 for ; Thu, 7 Jul 2022 01:42:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657150966; x=1688686966; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=EhM5mEYAk+sZXmjMobkrAzS9ayqavbh7sNv266X9vB0=; b=IMmKlFZB5zPamzXGs2JTAX/UMk7DLh/iGnwfz6Q7u+CeHAkVZfqcpo0w JjjZqtKIdm5HmgBGbvOPqwJJs6/o8S/LPplSE9Bfk+zPH2HgE6PBLLoFL A4tQEDVR/B43GhsMZyL5wOX+qXTfpbP1MRsa6iUYlDLClHydchEh0+DTP ZNkZVrLLs0Zb61VMFbG1KsMmetwL+GAGz96lETu2cMrl3zPBXanXpKQf9 QxSVS6JXE8lijw1OEXBOkgkjZVpejxG4A1raa/k2GmTApMaSShnfmjj/I s8aea2AutBkTaluBKnScleLbIeg0ZSC3sDojmBKUClKINZDGX6O59vOHv g==; X-IronPort-AV: E=McAfee;i="6400,9594,10400"; a="370210644" X-IronPort-AV: E=Sophos;i="5.92,251,1650956400"; d="scan'208";a="370210644" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2022 16:42:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,251,1650956400"; d="scan'208";a="770221939" Received: from skx-5gnr-sc12-4.sc.intel.com ([172.25.69.210]) by orsmga005.jf.intel.com with ESMTP; 06 Jul 2022 16:42:43 -0700 From: Nicolas Chautru To: dev@dpdk.org, thomas@monjalon.net, gakhil@marvell.com, hemant.agrawal@nxp.com Cc: maxime.coquelin@redhat.com, trix@redhat.com, mdr@ashroe.eu, bruce.richardson@intel.com, david.marchand@redhat.com, stephen@networkplumber.org, Nicolas Chautru Subject: [PATCH v5 7/7] bbdev: remove unnecessary if-check Date: Wed, 6 Jul 2022 16:28:30 -0700 Message-Id: <1657150110-69957-8-git-send-email-nicolas.chautru@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1657150110-69957-1-git-send-email-nicolas.chautru@intel.com> References: <1655491040-183649-6-git-send-email-nicolas.chautru@intel.com> <1657150110-69957-1-git-send-email-nicolas.chautru@intel.com> 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 Code clean up due to if-check not required Signed-off-by: Nicolas Chautru --- lib/bbdev/rte_bbdev_op.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/bbdev/rte_bbdev_op.h b/lib/bbdev/rte_bbdev_op.h index afa1a71..386eed8 100644 --- a/lib/bbdev/rte_bbdev_op.h +++ b/lib/bbdev/rte_bbdev_op.h @@ -970,10 +970,8 @@ struct rte_mempool * /* Get elements */ ret = rte_mempool_get_bulk(mempool, (void **)ops, num_ops); - if (unlikely(ret < 0)) - return ret; - return 0; + return ret; } /** @@ -1006,10 +1004,8 @@ struct rte_mempool * /* Get elements */ ret = rte_mempool_get_bulk(mempool, (void **)ops, num_ops); - if (unlikely(ret < 0)) - return ret; - return 0; + return ret; } /** @@ -1035,17 +1031,14 @@ struct rte_mempool * int ret; /* Check type */ - priv = (struct rte_bbdev_op_pool_private *) - rte_mempool_get_priv(mempool); + priv = (struct rte_bbdev_op_pool_private *) rte_mempool_get_priv(mempool); if (unlikely(priv->type != RTE_BBDEV_OP_FFT)) return -EINVAL; /* Get elements */ ret = rte_mempool_get_bulk(mempool, (void **)ops, num_ops); - if (unlikely(ret < 0)) - return ret; - return 0; + return ret; } /** -- 1.8.3.1