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 0B9F7A00C3; Wed, 21 Sep 2022 22:58:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F362A427F0; Wed, 21 Sep 2022 22:58:20 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 729774067C for ; Wed, 21 Sep 2022 22:58:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663793898; x=1695329898; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ZggEBWqrGY61I1fputhTUbWYwnTofR42zSJ6/uiE1r8=; b=jShXsgIKV1f2JBiMW9u8NSQkKjzq+r9Z5iv0VhlFRMfUz4Nw2qh4Eo7o SqKXWSS8/NaDnvNnnGOWiBwtY6iyLq8NNTSQr4Jvktjlqu1kcuQ9Uzmbn JBNKdBLO4l2OKWpN0GDB+8pWaTbmkdABxSc11wvRVoYPabx/xgUrcUL78 MEHMvpJPCyaiQB0X5kUlf08oO7oZOAU2yFQGyZlMh3mOtciAeECysZ+Sy Nl80+0HwWqCB8U82iGMg5xFV35Sk4s92QK3FCP26x93Q2T6sKF4qKX/Xk S4VOnU9ar1SYoFlkG5jc4Yc35Y3chEPIGbHNI6ejaD440b062cdXvN5+y w==; X-IronPort-AV: E=McAfee;i="6500,9779,10477"; a="279847823" X-IronPort-AV: E=Sophos;i="5.93,334,1654585200"; d="scan'208";a="279847823" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2022 13:58:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,334,1654585200"; d="scan'208";a="864589307" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga006.fm.intel.com with ESMTP; 21 Sep 2022 13:58:17 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 21 Sep 2022 13:58:16 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 21 Sep 2022 13:58:16 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Wed, 21 Sep 2022 13:58:16 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Wed, 21 Sep 2022 13:58:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F+tI122rWQJJ1WQlrN/ZhuHPBKOiuxsTOH2UMr3fMYuSR7QOQCwPu1hi02Dw7b9CJxq7hQ4CfPr1VpGzeujG6MimxoWJVqTKRboX3bPAVNh8puw4CMg7ZJCRBUSrOaQAQbYf9YJtOS1WaPuL5uV+mmLhVQFcGjtQAE+GXG4nj4Nf39+peTgOOXS0+OtxYl7aQwPc2lB67riMiE7Bm1zUUwntvAj03k3j93sKTJUPyxGSP/OFsI36LFaXHkGhgmeCn+UEczp14bca/bf6QPGvXem8xZEOiCtrjGyI5SA6wavNylw9Oc8GUttqyfudntvTZE5twlkWVR0weG1hMdGwHg== 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=IikmFP00dPspYFdNLU/WVVDXkgGmnYrgBaqc4tGmO20=; b=A1hhV2os0xElEmzeCo8f/V1ll1EKeZ3MerjPU8p3DFg0x4O2la7SOfRJyOvbePBYf1OIgxea8QGb6KWDMrp09cpCYKp4B8CQ9CfBrrXLLq/0YZvKoMZk9uCQYpwKqQqsssOIwi3GoIK/SN0+I/3/Lwg2ySUo6AEDFr7kbqd0XGkQIK0kls+xVdmnFTsj85p3nybU8n70ge620WQ30ZhBZQEcReIJ1TwBlyjWjmOETJhj4MYJYpiAIklAcdpNLlB1zhstAS8Ry8moU/MzSHCL48Srn4xMzVK50BIdNlO6IBV4ThWeujmrs3hYqGK7D3srTAR83iXYXtiBpKnMxQgZHQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BY5PR11MB4451.namprd11.prod.outlook.com (2603:10b6:a03:1cb::30) by MW3PR11MB4649.namprd11.prod.outlook.com (2603:10b6:303:5b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.17; Wed, 21 Sep 2022 20:58:14 +0000 Received: from BY5PR11MB4451.namprd11.prod.outlook.com ([fe80::e6be:3feb:17fd:bdcf]) by BY5PR11MB4451.namprd11.prod.outlook.com ([fe80::e6be:3feb:17fd:bdcf%7]) with mapi id 15.20.5654.017; Wed, 21 Sep 2022 20:58:14 +0000 From: "Chautru, Nicolas" To: Akhil Goyal , "dev@dpdk.org" , "thomas@monjalon.net" , "hemant.agrawal@nxp.com" CC: "maxime.coquelin@redhat.com" , "trix@redhat.com" , "mdr@ashroe.eu" , "Richardson, Bruce" , "david.marchand@redhat.com" , "stephen@networkplumber.org" , "Zhang, Mingshan" 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: AQHYu9UiLi6gCTqmgUeKCEpYHL9mK63qaCMAgAAZvqA= Date: Wed, 21 Sep 2022 20:58:14 +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: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BY5PR11MB4451:EE_|MW3PR11MB4649:EE_ x-ms-office365-filtering-correlation-id: 40a8a4ff-6481-4823-6937-08da9c14006f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: il0WeyPBoNcz8FWK2m8dcFfFC48fFXgxdKP/LA5mLPcv+8AgnmNX/71fVJGtV4I/48VnP7JDnJcNLbjV/Fcsauzy4UiPqbvWI6BbrVHwIu0W1j+LEpb0Im9od3CTkP4SCq5Aukjx+qq5IqCjlAeYFMHE5eQZnq+Cmm61Kd4RLI3WwrtXuBT2xGfkKXCWTgzSCemZC6tHwtebvWtIvj41A+QOX9JhiHeqel4KSGCHvpYPdODrH88JYKMcSen1H/1hc5p8nX73A2NVPC23ilv29rs6IOykMBUvh1x3IosnxXsMhh14Ahwo/MaMFLt8g6IVavDmgDIP1t1c48/1nb7fhNvQeVyPZO5lVqDaL+TTLns1Dt4r79wSMgKWGQN8AhJrr4+x6Ht/3y1OktKZfwIXBWALhhzgHFJRgDXdtRzmWEONdpeoha7bI/rvDXYs3Afl3RQnqokG7Hp8tx0y0BUNHwWPpgmE53bdNPYMkAe9bOUzazdksQ+rUQP/p01WuXi6I0usVqTpLyj11kfeSirDpn2F2Xi3RYHPEzhoBGpHuQCw1USh90GHcA51dq0MruHiQuSRM7WxHwFGDeb3soGMF43U9/cObDStf3kFI7vPNXW55TZUs9f/uRWDaeCGApExos+gRio6bRh8DLAtmCp1AXeKAb71NK5hksYJzQcTWClogyInSkxAFDhY44HLFERKTvOUSjCKWlaoNRXF/XdGHbEmL6AKoW1B7nSxwPMNnt+bi3x5htVikdHZZg+FTZMJOZbFm3YObgoTAeXdkWProg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR11MB4451.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(396003)(376002)(136003)(39860400002)(346002)(451199015)(8676002)(76116006)(83380400001)(66446008)(64756008)(66946007)(55016003)(316002)(4326008)(66476007)(66556008)(5660300002)(7696005)(478600001)(52536014)(86362001)(8936002)(6506007)(71200400001)(2906002)(107886003)(110136005)(54906003)(38100700002)(33656002)(41300700001)(122000001)(186003)(9686003)(38070700005)(82960400001)(26005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?gfDdeEnkSccxoarJPs8C4i27aj/2VNVyCxCIoXnBDaA9hKG6Yu7HlY8gXgpL?= =?us-ascii?Q?+/y/qoe+Gtn9nIIq74FNbUvbaK0R+ONY5xeQEDgUKdldAaEET6fzKt8DSL0Z?= =?us-ascii?Q?dm5cK/tj48AYIQfBFVABHBgjS2QmkSoQw7LYUzch8h9Pm1+Odx7nlkGEo17n?= =?us-ascii?Q?TN3T5yAL3H/rFV1PzloN2/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?= =?us-ascii?Q?kuVgBa0VnOHSRvmkbSAmB/2XVqFvbwDWpP/WRghy1MwDdI57rUGzUHlEcf8m?= =?us-ascii?Q?UmW/uhYuY+YaR41+pSkpeNv/hXyxAB5bhOWSvsLkNeDtUyqdYKhs0IdHeUye?= =?us-ascii?Q?2hthe+aAK+//oZY2GkxSmDe0+h/32dYHcVTVIdUS6usyDG2c1fcpYItLThYp?= =?us-ascii?Q?zDa5N7Nw1SSOS/ZqN5BaAHkCMaxS4B1ZEeNT/i3GbWKJGG36JPgsODae+jq9?= =?us-ascii?Q?jKRSX+efZ0J0H6tyaGRTOwUcevfjSr8e6z77qV9Y8uDQpIOt2cFu0nH6blk6?= =?us-ascii?Q?DAsTvzw3OliQVoVjb0iChkYNbXtfOL05W72/Bqm91HwvBFwX16uetPurGlLh?= =?us-ascii?Q?XPRjyPtiXpwSAo318+4nnThMo+W9qdhJ2L1lScTHwgxPNOemZmjv/H+Nmipi?= =?us-ascii?Q?mz6WYSUOYgdZUAyMarLnRkVVc3dpMYv3xxpCAzEjxOu+3nv6Tnyjxdub2ukw?= =?us-ascii?Q?Kv6421PQ9jbGprgWiY8mMCMXXe5E5teMJaOOoO1p?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR11MB4451.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40a8a4ff-6481-4823-6937-08da9c14006f X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Sep 2022 20:58:14.6770 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: XuklmGoAXFbQY6Wl7hB1CGRwKTD6Dz19/8gkWMcuplnEQwW8tjw8uhK0+hGGpEMWxtpnE+Pd6V4BmGsMzSood+jt+c1V3rGCNGcYuYLfFnc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4649 X-OriginatorOrg: 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 Hi Akhil,=20 > -----Original Message----- > From: Akhil Goyal > Subject: RE: [EXT] [PATCH v7 7/7] bbdev: remove unnecessary if-check >=20 > > 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 =3D rte_mempool_get_bulk(mempool, (void **)ops, num_ops); > > - if (unlikely(ret < 0)) > > - return ret; > > > > - return 0; > > + return ret; > Do you really need ret? > It can be easily > return rte_mempool_get_bulk(mempool, (void **)ops, num_ops); Sure, fixing in v8.=20 >=20 > same comment for both cleanups > > } > > > > /** > > @@ -1006,10 +1004,8 @@ struct rte_mempool * > > > > /* Get elements */ > > ret =3D 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 =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; > > > > /* Get elements */ > > ret =3D rte_mempool_get_bulk(mempool, (void **)ops, num_ops); > > - if (unlikely(ret < 0)) > > - return ret; > > > > - return 0; > > + return ret; > > } > > > > /** > > -- > > 1.8.3.1