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 0B4BAA0555; Fri, 26 Aug 2022 21:52:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F0A6A40146; Fri, 26 Aug 2022 21:52:15 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 785B340143 for ; Fri, 26 Aug 2022 21:52:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661543535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=u/XPOncE+tp8EKeXTL3puyNpvJmolE/XXZLT2xVDVr0=; b=dcywELYHeKqCvGaIOvFoxFVkuwEAkcmygMVCHrdG3RPsusFMqw9Zg8sSL3pkWrgGYN+Vtv OiKKROCRyF+dNEuzoKgXBooN97eTXebHqVgxZCX0Vc2NU+kWimXUlx/wt8HdAUxKy+HESu 60qyT18DAzeuUjBhbRq0tFN7fxUrJiU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-50-jtJryWuaPamytJ8PBZvl_Q-1; Fri, 26 Aug 2022 15:52:09 -0400 X-MC-Unique: jtJryWuaPamytJ8PBZvl_Q-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6F0183C021B6; Fri, 26 Aug 2022 19:52:09 +0000 (UTC) Received: from [10.39.208.30] (unknown [10.39.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8464BC15BB3; Fri, 26 Aug 2022 19:52:07 +0000 (UTC) Message-ID: <99635a75-cbc5-a1fd-2db8-af7cea4836ad@redhat.com> Date: Fri, 26 Aug 2022 21:52:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v6 7/7] bbdev: remove unnecessary if-check To: Nicolas Chautru , dev@dpdk.org, thomas@monjalon.net, gakhil@marvell.com, hemant.agrawal@nxp.com Cc: trix@redhat.com, mdr@ashroe.eu, bruce.richardson@intel.com, david.marchand@redhat.com, stephen@networkplumber.org References: <1655491040-183649-6-git-send-email-nicolas.chautru@intel.com> <1661451851-106079-1-git-send-email-nicolas.chautru@intel.com> <1661451851-106079-8-git-send-email-nicolas.chautru@intel.com> From: Maxime Coquelin In-Reply-To: <1661451851-106079-8-git-send-email-nicolas.chautru@intel.com> X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 8/25/22 20:24, Nicolas Chautru wrote: > 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; > } > > /** Acked-by: Maxime Coquelin Thanks, Maxime