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 A44CDA00C3; Wed, 21 Sep 2022 21:27:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4C51040691; Wed, 21 Sep 2022 21:27:38 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 84FDF4067C for ; Wed, 21 Sep 2022 21:27:36 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28LA54v6024593; Wed, 21 Sep 2022 12:25:29 -0700 Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2046.outbound.protection.outlook.com [104.47.66.46]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3jr0b724x7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Sep 2022 12:25:28 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FMSzAikGFtqVXNm6NkqhuMB21l82983cEaz9VKAl27AjQGW30frW9Jt3Cw3PHbdhP+euu/E9q0gvba+0NRvhAJLGywBqoTzdeS/x0pXVcxL9GVn2ArMIPCr2xBbrNbt/4YNoTA2tpLUIu1O8uFxBr42kuMi8ELGPt7IqP+EBbig0CXdL4tT0oJxQ/9mnMykdzA1A8GyFCm8tYx3S7UydzLCyAIxWxs1OHdd9NgUUq+Hpfmvmm8lhJV3+vIFR3fe56yrsG1G2H5d831MaETxc9hrq2E2Q1n8bj7RI5p3aAECd4C4Va/8jnkE/ZW85ZPV6TfuxrqdR8EqASaSZZmJShQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=V3NtqKJrBAoe8193WlpOa39vlBaTzlkAEYOTbquxbsQ=; b=ea2RAUHHok7esFTajOo4DnvbvI3OHDbMhMVUPb6WZcUWDmMz3BeGJtvrslanQg7KlXEWN9kTfpwhStFD99aoLwzB0zlXgVFvAm1yhAthmRomoeUhtQEYK1tyQFCFRZKIN2vIiikkQUSPpg3yPOoHXP7+rqDEqf6MLhsn4yVBqypaxpyu4w+TflzoRAwKZcpRUZG7mcLTlJapkp34MP6B5MCvMavocHfIvGsvPms8SeLW7zdTE0kywfNhQIS2loPSag5048iwTgBQlADbg6J4KXpjFqUW2msFcJ4qlp8U6dEwqfMru5C2OK09KIzk/EwS6wxoTia1B9AMFfqr9XiusA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=V3NtqKJrBAoe8193WlpOa39vlBaTzlkAEYOTbquxbsQ=; b=qk60blPLAOmNHdrEolG+YzTexmBe21su05+ZLWaKfHGF/AuQwaVS7C711bFczuTQ2vzaXk5BKPuRDavRbKjx8TFE9mqQsUOAHEbnKhB8j/HPnM1ihLQdthTzivdKi4514VIcX6C805l4RmMOYSq7pQxUYltEAlCy3dXrNAvucqU= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by PH0PR18MB4719.namprd18.prod.outlook.com (2603:10b6:510:cd::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.16; Wed, 21 Sep 2022 19:25:27 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::7cea:d050:5433:8c74]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::7cea:d050:5433:8c74%7]) with mapi id 15.20.5654.017; Wed, 21 Sep 2022 19:25:26 +0000 From: Akhil Goyal To: Nicolas Chautru , "dev@dpdk.org" , "thomas@monjalon.net" , "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" Subject: RE: [EXT] [PATCH v7 7/7] bbdev: remove unnecessary if-check Thread-Topic: [EXT] [PATCH v7 7/7] bbdev: remove unnecessary if-check Thread-Index: AQHYu9UfdikxRMpRL0mh/cqATDGAya3qZ22g Date: Wed, 21 Sep 2022 19:25:26 +0000 Message-ID: References: <1655491040-183649-6-git-send-email-nicolas.chautru@intel.com> <1661796438-204861-1-git-send-email-nicolas.chautru@intel.com> <1661796438-204861-8-git-send-email-nicolas.chautru@intel.com> In-Reply-To: <1661796438-204861-8-git-send-email-nicolas.chautru@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO6PR18MB4484:EE_|PH0PR18MB4719:EE_ x-ms-office365-filtering-correlation-id: bfb88c90-350f-435a-7570-08da9c0709cb x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yc3lvnqIVgIw+e62b3znFaYsieyrB4H1d6ejGiXrpM0t1/k7AFXD0aF2SB3PP4fdZKPe/6ClrJCXKK8giN4ypsHkyKN6FFwBaJO6aJW5MDQ8GamIBaCxLoG9MODNDmYni5euzlFeabR2/D2LduuuZ4NJ37zh87HQ9aoH9B+kRhrixRd89jKsl9eLQ9dwsYt31VnVTSD1XtBijKwcyIrIl2iLDuZDCjThFayedwFDQjIv+zaUwJp5h66p+IaH3ID3IGS50xzB9Y36xQK5TH7NbQxW800P2EdRgxfdoWAO+czulYSk2bV7GnJeBtQqlq+HPIdQhi1VX6hLTLSJChsfvKqeH6KDoIyFRjj7Xug0i+ua/YFunQz3aOr3ATn0XLHUsQejHH72hKrvKWOoW9taQhhQZ8gfrUZNH+tWVpveBdNXAGsB47fC1rHd7PWyGr1gh4EC+jAsOiJIG6wWYoF4l7CVlTxWhtga4bVZmb/TLuJcRM7dcQPodEfhWFJZzaWlsEVKaHfUg2ZbtpRxUAWvmbkN/DeSou01UZ6IsFUhHZF5yDmtKM83c8faMJ23COIs09cGE0bxlES83KpqdsAfcs6T9DviD0em4OCKsHrcKs0xuIp0/JbGU8DOAdhcBvtEUcMRuvy5NiF3kreghfkPMXYY5T+vkGG9+GGhpG6ACXUNgi09WxAsTyP8KMS2ZurHl1osGvE70D4QTJKzur/wm5RH1ETJ9H6TB6JAVRpDL660hvf/mkMS9Uhm4kLwwoK5fPU+WaoDVZSQgtRiTsz38Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(396003)(376002)(136003)(39860400002)(346002)(366004)(451199015)(86362001)(2906002)(110136005)(76116006)(33656002)(54906003)(8936002)(52536014)(66556008)(8676002)(66946007)(64756008)(66446008)(66476007)(7416002)(316002)(71200400001)(478600001)(4326008)(5660300002)(41300700001)(6506007)(55236004)(7696005)(83380400001)(186003)(38070700005)(55016003)(122000001)(26005)(9686003)(38100700002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?b3mKL4RKr5qe04rTls3GUmK05/unNFI3X9Om7jIrp1dCoOmCjd6+pOyqIjLg?= =?us-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dcXIghrB8842CcpdWk4cDVMs5?= =?us-ascii?Q?e3P+zvqHsVx6VOLJ4zVHOm+Jj6AQUjccATElucq5uEUgwrzHrWIFuyWTcu2O?= =?us-ascii?Q?GsyU+/l1lfKjvW8Z0Y9WWdMGKSTTlPEjs0Jev3GHv5vn7MqSGi6ZTUOEt77x?= =?us-ascii?Q?w8q/pSplPiI0hLonmTu9Z1ryPeXhVMERhCczKmqBCp1FMKWLrbrJeAOuBwVc?= =?us-ascii?Q?Ibjm/oVk32UjYgvBVMaXLs3h2Mzng/wnjGMPOgvTJ14LrlI6nWcBzhKmMmHA?= =?us-ascii?Q?6PphL6qjZ/1yEFAkjSpwX1VHZNAdXOgSqZfM2Y5F1nJCoks12rpCsnXZZ+5e?= =?us-ascii?Q?T7KoFScJ6JLnc7fhLTaxPraa5kDpqhiGprnzM44AoZU2oy78ysJo0r/5iibb?= =?us-ascii?Q?1dcEp3+YMTJOfWl6CqkkIKYVS9+8aQm8m//5s5Y83pjhoatHJkBkGdiDYu6D?= =?us-ascii?Q?ob1t9tUfAt3lo9RBiCkuYArJVWjtLQNLK9d4wmJI2/5M19jjxLQBuVoQiBgP?= =?us-ascii?Q?GCifn3UUYl53JEwZgr/EyUd2zQyFWNVrmgp3LZw+1uIU6sa7IZSsGVFFN8f1?= =?us-ascii?Q?uNcWlzx3zb/FOz+z0axEbdIeJWSuqKwvNZ0CPD+rHiEMUlD9AA6MtNxvCKV2?= =?us-ascii?Q?9SMwWXAQ2QYTNqZUI+PylgL1EWlf3VdrIvGSJ5Pv?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bfb88c90-350f-435a-7570-08da9c0709cb X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Sep 2022 19:25:26.8910 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: oGAGPmtJfDDk3e/wdwsu5iFrZyeMBgxOo9bQi4KvfJbLF28mMP5FIYaUdicUe9s+imfa6RAy2OXvOaPZNAExDw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB4719 X-Proofpoint-ORIG-GUID: o9v2xRVuks1JcHKvQlrt2XPEoIkmm7YN X-Proofpoint-GUID: o9v2xRVuks1JcHKvQlrt2XPEoIkmm7YN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-21_09,2022-09-20_02,2022-06-22_01 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 >=20 > Signed-off-by: Nicolas Chautru > Acked-by: Maxime Coquelin > --- > lib/bbdev/rte_bbdev_op.h | 15 ++++----------- > 1 file changed, 4 insertions(+), 11 deletions(-) >=20 > 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 * >=20 > /* Get elements */ > ret =3D rte_mempool_get_bulk(mempool, (void **)ops, num_ops); > - if (unlikely(ret < 0)) > - return ret; >=20 > - return 0; > + return ret; Do you really need ret? It can be easily return rte_mempool_get_bulk(mempool, (void **)ops, num_ops); same comment for both cleanups > } >=20 > /** > @@ -1006,10 +1004,8 @@ struct rte_mempool * >=20 > /* Get elements */ > ret =3D rte_mempool_get_bulk(mempool, (void **)ops, num_ops); > - if (unlikely(ret < 0)) > - return ret; >=20 > - return 0; > + return ret; > } >=20 > /** > @@ -1035,17 +1031,14 @@ struct rte_mempool * > int ret; >=20 > /* Check type */ > - priv =3D (struct rte_bbdev_op_pool_private *) > - rte_mempool_get_priv(mempool); > + priv =3D (struct rte_bbdev_op_pool_private *) > rte_mempool_get_priv(mempool); > if (unlikely(priv->type !=3D RTE_BBDEV_OP_FFT)) > return -EINVAL; >=20 > /* Get elements */ > ret =3D rte_mempool_get_bulk(mempool, (void **)ops, num_ops); > - if (unlikely(ret < 0)) > - return ret; >=20 > - return 0; > + return ret; > } >=20 > /** > -- > 1.8.3.1