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 49BDEA0350; Thu, 27 Jan 2022 12:07:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 34DDE42799; Thu, 27 Jan 2022 12:07:22 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 3EE6142793 for ; Thu, 27 Jan 2022 12:07:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643281641; x=1674817641; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=czAFJM+Btm5CwAq3TYTPnzu9xltQu8HDS8xNBX3OyHg=; b=EQEzQBZIne0ADCnN+ghq3iP3wTuvDRfPDGlcSt3+vfFRowsc9bjp/3z5 Rco0aEa0b0ejbycsE/2iF0GhMFHlqUBms9dUygM61uBVym2KgquiE0pWZ harF3dbPixrHooSS7Rdkosfy2iI341tIM6cuc9RlwjqAiCP8UiNnT3lbA GcXOn4n6zGLpx1JlvKcFRknHWztqjb2IVjy3z6+3SsBKrIem5yrivSfw0 lZb0sc1nsbV10qflzBhxYhdgsPloibQcs8VyGFa7NwE19eUkwryuRdsjj 2/dnh5KVLWA1u99D+71qghlabDTVs2J0sa0Z5P4uwhQ5UbxJwSkUX6BSb A==; X-IronPort-AV: E=McAfee;i="6200,9189,10239"; a="234193866" X-IronPort-AV: E=Sophos;i="5.88,320,1635231600"; d="scan'208";a="234193866" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2022 03:07:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,320,1635231600"; d="scan'208";a="597789066" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga004.fm.intel.com with ESMTP; 27 Jan 2022 03:07:18 -0800 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 27 Jan 2022 03:07:18 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Thu, 27 Jan 2022 03:07:18 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.172) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Thu, 27 Jan 2022 03:07:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dJYd4ejxGUaAVa2VPXmBXbm6fHcqmDrc56kHnneItMEFkNxF3womy0aWoZPzTi8lrKR0LT7OQiuOppS0x2DmGgekIba/AJ34CdZyocqSAi42SHtb/pWrBVg9yCX+aIDoaB+OR0ts2Jit+YlFFOMWGVJBgFYW7AumYRdZ777AiiJAB8dCKzqvMQ+pYaA96V5H58UEPxPbr3vFBryVZrMXrrXt3buUzRyI27q4ljCtyOQOeUZRRwVkLVPzAJWBLP7qg6aJnWMOy3T+kCOUesUP8lp757n18XuJcocBESzcBJ/Q7g7S6NV1+x1D8RjZHYczfpZpb6LnjE8bK8oTQIg2NA== 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=hf50eCMmgnmy1LFqsynrinC7fC7GCRxHy0ylIJxTFQM=; b=I/evTlF/69pnoVdgJvS7DSuUD8BO04a7/WKnVpwFnrusJEbrcKwqM7EdaKn88Kz9vV0Ec59RNISY4YJnXtU5fms5/AsiYuJVTswFJaKUYFfscTf3wK0qNGJ0aQuhq/pxqs/Y2/GP8jPKTNIypsv6hoxLPlzRifTMCZdkFWMpb37YaFTMZOqICy1tfnSPynWp7KCgWi82IXqAgDZ8Eq0cOYySVyuo0G1p/IwO7i5tmHl1x9bcDMoPu/gpJumTAOwpa7hdWL/EZAoRZvRtcTpGve6L9zSXNxrG/N3D/dMy/cUZFu277Vmqrfh8Q2ii8lrB1pBwx/LVGkPO7DdLzEWcKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from MW5PR11MB5809.namprd11.prod.outlook.com (2603:10b6:303:197::6) 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.4930.15; Thu, 27 Jan 2022 11:07:17 +0000 Received: from MW5PR11MB5809.namprd11.prod.outlook.com ([fe80::6044:ba49:2592:68c5]) by MW5PR11MB5809.namprd11.prod.outlook.com ([fe80::6044:ba49:2592:68c5%2]) with mapi id 15.20.4909.017; Thu, 27 Jan 2022 11:07:17 +0000 From: "Zhang, Roy Fan" To: Stephen Hemminger , "dev@dpdk.org" CC: Ashish Gupta Subject: RE: [PATCH v2 77/83] compressdev: remove unnecessary NULL checks Thread-Topic: [PATCH v2 77/83] compressdev: remove unnecessary NULL checks Thread-Index: AQHYEUql0GJqCnuQoUOtYQ1kCExkkqx2uXOw Date: Thu, 27 Jan 2022 11:07:16 +0000 Message-ID: References: <20220124000518.319850-1-stephen@networkplumber.org> <20220124174719.14417-1-stephen@networkplumber.org> <20220124174719.14417-78-stephen@networkplumber.org> In-Reply-To: <20220124174719.14417-78-stephen@networkplumber.org> Accept-Language: zh-Hans-HK, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.200.16 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6160c917-0af8-4e8f-65ff-08d9e1852e26 x-ms-traffictypediagnostic: MW3PR11MB4649:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:346; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vqfYuFEjf6qpm46kpQHq5MPSXYlBUKmDNqveVBJRnFuWd/4gAYMFnIKXIUB3UOL7ET5Tc4JYsnnaWcyC38w98VyczFNDd6qlPRgWRlQTyw1g4RU8FeYEkanqDbCkWJ47pE1G2h6uSjRlOl0IC3JzI6GbFMDrO2EocrgIxeRHrL/iUFcfaQMrhG5yjiHqj58KXExh5O8rTbuum5Sc1f5meLRQ+EPt0cRpWF03WVtgMCOE7Ns2/mQLDhlkBXgZZosRRqLtXbXhARMTjBxR3faqSe/Fcr6cDlUnt8f05KMOOJZDGoRAcVm/oUJCTPmcUT6Tq2GXsqCM4DfNpj1SO2Yvbtf/kk6trkIlRBfwFffy9V6ixDx6UL/9u1BpWKYJDJjQCbmc32H28BfJ1JwUTwjYeFCj5w0DjAtyoU/eno2ftIkj7GVS5d+bvfayuM5QemTq0qyKQM7xS00Ox33QLUjRR9lx26Es9mG7b7YlyC6eJ5oqDuZJy3Go8Yzrqaec+f83zPSDTqMZKMRJ8fA6LtmqRuVAbwe5xpP+Zh2vHSH+VpBKs1cRQqOYZ81W2zLUASK0jw4QWFkqjHwprvRtlgwswbregGW403i1LpbAuWKVoGMXLke+qLY6vkP/F6z8UaH1DzOmecJqT8gc9R3qfWgP5mmYpmpgclgUBvnzZnKONHVHIe8s8DukUgAkdI12CnvxaRIRGn/z1fm+fhQJTUiJ2A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW5PR11MB5809.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(52536014)(8676002)(8936002)(110136005)(66946007)(5660300002)(66446008)(66476007)(66556008)(76116006)(64756008)(38100700002)(82960400001)(122000001)(4326008)(316002)(55016003)(38070700005)(508600001)(26005)(186003)(86362001)(2906002)(6506007)(7696005)(53546011)(71200400001)(9686003)(83380400001)(33656002)(20210929001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?MOdrsxAwAyITl8rtQY4z24Ir5eXYvO7Nkibm5wdN3CC16Y2H0LvwFlS0?= =?Windows-1252?Q?TS8wfkOoThEHzqqOOecvrXVkKETXEEpSUaVCHvpaWwjspaT5G+kOfi8c?= =?Windows-1252?Q?dM7Mm9rcLYLb7Z+/yC+Xl6FLtUk2JbGzQb8QvS0h6Je6ZWklArVcQE/b?= =?Windows-1252?Q?ewPpLjr3ABFjX+u5CNPocdxBcr++TKqvr0FfxgI+hE2P0pS3g7iHIRBf?= =?Windows-1252?Q?IuRfs9yvLUi8zVyK4M7bTHaYA1vIAvEnHr6He/R60sRzR5foDAsrCYny?= =?Windows-1252?Q?W+6cnwmYHCn6wNS5H6AAGpXcPC2CJ0ZFEF5gUNQSxUzm9/eRpv2czwRO?= =?Windows-1252?Q?Yo0K7MIxHu2tdVMiA/mxHM0gMoUVOeATlkMSapuKl8E95uGctm/x5XwD?= =?Windows-1252?Q?+3IBgEZSk4a+GquI7YLU0IiOM0qnX/1sf3DsMw8mq3Aom1c9AJrMZq92?= =?Windows-1252?Q?JwoRprfmxvfGdu+3dlUxLzex2LclZiGadErYF+/QEHIEK3XnKTBwjJUx?= =?Windows-1252?Q?jvqbMgwEX12k6ui465BEFuSxODxXdxULr6YMw0MXGgjHbvYJb+qCqMYe?= =?Windows-1252?Q?yxz9uTXYN4OX5Hr65GrNhoJaq5iZgj5KOD8xDJUwP30frUWS8KKM+RAH?= =?Windows-1252?Q?XUcGzCxbqHmVp5SDWBeu8weqIRx+Ys4HDq3lK1i56lMrK7fiCSk5ko1T?= =?Windows-1252?Q?rUIeylTn8Uts9rhSUoqq8IUx3mHkCgMr7bSxsUs4sVE3uZ2Y6iQJqrtE?= =?Windows-1252?Q?wKP2SaJ+JZ9BazYANcpCJVEDSaz7euVV652eHYhSyhOmibj+WfA4wTjN?= =?Windows-1252?Q?THDc5onBPMeIdUl2oZMyS4xGhAzgywS51xTI/6vrLGo/7Mj10hfToMvp?= =?Windows-1252?Q?Ub8SCaD4V2bAUeVRGGX+ALpBqygmxv3L/H3gXe4j0XWWfSEEj4oe/Jx9?= =?Windows-1252?Q?I3oOXdO9aMEyEXJxuZilJo2fTzrVf6lXlv7em7QngGmLGNFOAw1QIXlU?= =?Windows-1252?Q?PaP2C0mGSdcaH2HHmB3jVZKFt5ZFDqT++wV4L9v2N0HdFuLoYX6L/ZPp?= =?Windows-1252?Q?VfL0ETbIBrjuFdOz6yhOVKKd2DdNvrk15FiV6q1wM5s+xz+dlmdZ/wwa?= =?Windows-1252?Q?KM+l+6RFp5hGHPxwp+azeAtuG8jMP/9QMFtBGd83eVTAgTTm0aiwz2gD?= =?Windows-1252?Q?2LDAP7vUCqFCnI3uC+lJWuotbB7WIs2ObyVd/RNz7pyIxX2Z/LASQK7+?= =?Windows-1252?Q?E+1wlZxZkRQdXJubjIl4TjGkCVyMROAevzyUkrITdVlOhYLHf/kApjeJ?= =?Windows-1252?Q?G41qvhoeeH8RrsWlJEV4bd+N3K6mrm2alkhjVDXq3f4T3Ars1c1GER4G?= =?Windows-1252?Q?H5QVKTTBUExLOflVPbkXdbs5+9tbc08VOe3VUyWijqsSTZJk4GEQez2L?= =?Windows-1252?Q?4E0OqHH6RUZU4VwvvQ5A0J1LxOPbE5XiGw93Q92Fb5uOPnorUNPEpqaV?= =?Windows-1252?Q?aFbCe+PUDHwf5gK0dypt1K2roDFmb4EzqIFZkyTG2KjuwRsryHqbeEkc?= =?Windows-1252?Q?HjvRvuF9YtmR9k7xUtlQHQ7SKivyXyGhn6jA2OYo+yqF28mWAeHRxxhq?= =?Windows-1252?Q?h5Wc1dJIbClRN8C2sqV9RBaSAxOIGGMTA+gE6Umm8tLvBwCcCiSZRTcI?= =?Windows-1252?Q?PHlS54RZQnOa1PMldkN84Ivzpjqkz3i1Om9pBoPM8YnaMDfcKEszgg?= =?Windows-1252?Q?=3D=3D?= Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW5PR11MB5809.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6160c917-0af8-4e8f-65ff-08d9e1852e26 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jan 2022 11:07:16.9554 (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: hpTRIqBwzD8uHHWO3FqwXf5g7J9pCgEigVjwrk2ZmN1az8xb/D2I2hVhERmxgrmu2l2BW0cnfjUrZgFCgXvMYQ== 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 > -----Original Message----- > From: Stephen Hemminger > Sent: Monday, January 24, 2022 5:47 PM > To: dev@dpdk.org > Cc: Stephen Hemminger ; Zhang, Roy Fan > ; Ashish Gupta > Subject: [PATCH v2 77/83] compressdev: remove unnecessary NULL checks >=20 > Remove redundant NULL pointer checks before free functions > found by nullfree.cocci >=20 > Signed-off-by: Stephen Hemminger > --- > lib/compressdev/rte_compressdev.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) >=20 > diff --git a/lib/compressdev/rte_compressdev.c > b/lib/compressdev/rte_compressdev.c > index 2e9218af68f6..d4f7d4d3daf2 100644 > --- a/lib/compressdev/rte_compressdev.c > +++ b/lib/compressdev/rte_compressdev.c > @@ -405,8 +405,7 @@ rte_compressdev_queue_pairs_release(struct > rte_compressdev *dev) > return ret; > } >=20 > - if (dev->data->queue_pairs !=3D NULL) > - rte_free(dev->data->queue_pairs); > + rte_free(dev->data->queue_pairs); > dev->data->queue_pairs =3D NULL; > dev->data->nb_queue_pairs =3D 0; >=20 > -- > 2.30.2 Acked-by: Fan Zhang