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 432D6A0542; Mon, 29 Aug 2022 20:28:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 85065427F7; Mon, 29 Aug 2022 20:28:23 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 7AE324003C for ; Mon, 29 Aug 2022 20:28:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661797699; x=1693333699; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=85ENNCoTFxdB3kixzEQ4zG/DVP1B7DUtRS1kd3VIHCI=; b=OBMa5n6ddh2gS3dwpRTIvKKlOWPgziqkha7T3aH/9HPeeFVgM15bFt0G 0omtLQvdLhtU6corOThZ4oTDZPRsNp42KB93dtfAgyQqMTw6Md1vLlPxU 3Tv0tXGi7GrLjLjMd205uKh0H2jAzzjBbgR/xjRvr2Ik+qiiKuYwQEvBc 6gfIwGONW1hCBJFbV5Th+KVw+iB0GsrdLhxo8zxOPzHjpJIBQ0tBsrHwP IBR1T1z7O1LoGtTQ80RUF0ZWUwof4zZ9SVcZC/6EsO3Z0KXeP/zSzBszS YyigEeAVd7bna4Febt2RHqqJ+1I9JVPY7sr0tx1/QOj9wm5EOjTh5D+Es w==; X-IronPort-AV: E=McAfee;i="6500,9779,10454"; a="275369541" X-IronPort-AV: E=Sophos;i="5.93,273,1654585200"; d="scan'208";a="275369541" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2022 11:28:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,273,1654585200"; d="scan'208";a="611396768" Received: from skx-5gnr-sc12-4.sc.intel.com ([172.25.69.210]) by orsmga002.jf.intel.com with ESMTP; 29 Aug 2022 11:28:17 -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, mingshan.zhang@intel.com, Nicolas Chautru Subject: [PATCH v7 7/7] bbdev: remove unnecessary if-check Date: Mon, 29 Aug 2022 11:07:18 -0700 Message-Id: <1661796438-204861-8-git-send-email-nicolas.chautru@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1661796438-204861-1-git-send-email-nicolas.chautru@intel.com> References: <1655491040-183649-6-git-send-email-nicolas.chautru@intel.com> <1661796438-204861-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 Acked-by: Maxime Coquelin --- 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