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 6DED8A04A6; Mon, 24 Jan 2022 01:48:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3ADDA427A7; Mon, 24 Jan 2022 01:48:55 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 4775F40040 for ; Mon, 24 Jan 2022 01:48:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642985333; x=1674521333; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=BlTVFPzA+V33ZkAKwJQxsKmcskRaCVD2s7TlGSfGvOc=; b=V3xODquCPlt5dcZJg/2Bnop1mxBMkiiJbjwW+72wMlWqbU2foIHfuQ4L MNg8tbey68wdKnJxVtEIYxv3F8lQSIsEljumiO5Cx1Kb9cZmx+e8JX+k4 +qjpQJYrq+kmzrZ8CpQCZubRr4trpv196mgwpo+BIvEUEMuc8G6WM/JA+ Nx2s5jva4KOD4q02tLCicEWl5uxgWTzx3bzGn4o57Fg4FsIyvb2YUZTpQ YzzjgIbBiJFgZueI18+FsL9uZvJEWXJiSCtZ1jaSGth6mNPmBnfKg6Lzg bggwICUs2BXUYgX1Fg2A8aLuXN9819JzXTgMjL/SL7L+M6U4rRjKcwL9Z w==; X-IronPort-AV: E=McAfee;i="6200,9189,10236"; a="244768021" X-IronPort-AV: E=Sophos;i="5.88,311,1635231600"; d="scan'208";a="244768021" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2022 16:48:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,311,1635231600"; d="scan'208";a="766232618" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga006.fm.intel.com with ESMTP; 23 Jan 2022 16:48:52 -0800 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Sun, 23 Jan 2022 16:48:52 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Sun, 23 Jan 2022 16:48:52 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.45) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Sun, 23 Jan 2022 16:48:51 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K3cgMAu/JzYlk3Ad9EpJCqSORCYEV7wD5xVTpynWYSC47TZkB54ltEWGgJbd7n+eFp9NP8XJWhCxU0bXI7BxhYQ9oVVUWzmM1deKkIgDQyDef+DvRJxd0zS0rVlGTCe+idEoSbmXh0MQcBhT2ft5gRg/Set7dpsqS590VxloFTOhbFZcqMVd7bv+YlMPcmZXwZJRGlIVVGuaYjtRIST3obTjZnJyhsQozZ7DuYKU6CB77dZEl4dzPzksuYcXa1gM6TAODZsZo44UyWvD2r9NmNK55fuilegP3BQZN8IqktuHnfNZXuYP3xL45Usl6CW0LZh7v2mka4E0uS5O1h33Jg== 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=oM576h0iPCumqCNlGcl3WnLWc/qJ68WAx9PxdGJQBIQ=; b=DCjfBK0PCMya+bl1kj7MGU7Rvf+gLjaJlqHleVCiKIodPK7WOMI+z5rAK9OON6kzWj42HpTmWYaFeAWCp/ct7GD3chLOAITBmWaY8e6PaPV0rqP8yVHdcrBTRWAetcroDaQ3H9MaBDtjEc+U5+DqHYsUFR+uNYq6ef84Dtu4ZjLlh032z+obcEYle/V8uPJFvRcT1K+fq2VFAEC00VQFchpC46T+Ii5XNBd3C9Rt0wMGMC6rnp/asvjPKestNNNM3xr4MiaJUwyq3yqpuKuWyBe+xg5DdlfUsV44JEeMfqB8/Ngs6VutEVhw7DrAQrNMYxKorkIHSKi7r87KfhMilg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from BYAPR11MB3495.namprd11.prod.outlook.com (2603:10b6:a03:8a::14) by DM5PR1101MB2347.namprd11.prod.outlook.com (2603:10b6:3:a2::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.12; Mon, 24 Jan 2022 00:48:49 +0000 Received: from BYAPR11MB3495.namprd11.prod.outlook.com ([fe80::8b:8b64:1a16:859c]) by BYAPR11MB3495.namprd11.prod.outlook.com ([fe80::8b:8b64:1a16:859c%3]) with mapi id 15.20.4909.017; Mon, 24 Jan 2022 00:48:48 +0000 From: "Wang, Haiyue" To: Stephen Hemminger , "dev@dpdk.org" Subject: RE: [PATCH 54/82] net/ixgbe: remove unnecessary NULL checks Thread-Topic: [PATCH 54/82] net/ixgbe: remove unnecessary NULL checks Thread-Index: AQHYELY/swkjDqDdo0ignDluxqXryaxxVYtg Date: Mon, 24 Jan 2022 00:48:48 +0000 Message-ID: References: <20220124000518.319850-1-stephen@networkplumber.org> <20220124000518.319850-55-stephen@networkplumber.org> In-Reply-To: <20220124000518.319850-55-stephen@networkplumber.org> Accept-Language: zh-CN, 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.200.16 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: 9bf47c22-5440-41cf-2929-08d9ded34870 x-ms-traffictypediagnostic: DM5PR1101MB2347:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2276; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Bl+C4kpjEigcsSHWTodNXWura09plHo6Ztt3Ru99odj9O5gWq3kTnPoNG2G/KcXOW5MpVWun1J/p6qqbpKfMyicvwakj6OgXocZmXqrmD5+yNyMOWUWs7F3kA/3ZfuTT2skYUq6vy7il+C007EiAgkhYjrdP1YkJcM4X6AdwCWdyT3fnxuvvd/fVisWoA3IIIREuRQ7YIhdaPbAEvRCdAwXhQPxaKDEEBHj7dK7LEQ7z0Os1k+c4BdGkT2B4yx6Dq04ba619IWLwMA3Gw3e45D2zVErSiATttcpKl8mgFs+I2boYBCGn+IPsvhsJu0TRJ5WirZ2FTmOAbXlzGjYU4wQbveWzFueVMKH+azZtWBBQPVcILXqM23FTFeupQud1n8ukkP7yZL9Kn86LOSZlLLAxqJ17QuKRXB9s4I2RoKMdnCKLeYcDSXiFJ0Gwzo++JVwth9hWoyDlUJ8aliodaGdW4ml39BuDbB20x+RPZjqb0PCK1v8caUD0XP0GbC2k4TiSnhw4sf2ATP3Fe7lVY6Ns7BVSGH0Zu0pj+/TvAFGxSa5puWpA1N+UO+fZL8S+PFcCsh7CDZRNvSPXfsi1Tis1UisycbP0ZvSxWZbF8AkughQ8fZiSirPll6ZMaq/V5HFhYnU9rtuMg06HE0cM8ayTcZQwD8+EYtopCHj4GnfOUC9z8ME+rbWRS49D0v3BJYjQgTZw63tUvZsFQFzDow== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3495.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(316002)(76116006)(66946007)(2906002)(26005)(33656002)(83380400001)(82960400001)(86362001)(110136005)(9686003)(38070700005)(186003)(52536014)(55016003)(508600001)(8676002)(8936002)(6506007)(53546011)(5660300002)(122000001)(7696005)(66476007)(66446008)(66556008)(64756008)(71200400001)(38100700002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?onpO3CTjI8rCLpBONpXz+06bAINEPzErRpkV3tE7lTo0I79wLX9p4tzbELcd?= =?us-ascii?Q?/wrtkzJFxg0DlL/WNFsjOc2MR2uWQfsJgBhftmoZxBdmCaXPDmn0QneVOvC6?= =?us-ascii?Q?+k+QqokYSXt9v31OIvgjdpeT0ShhL9v8USCP4r0lBxpL/oCDWxUpli0SF6ec?= =?us-ascii?Q?qK7fF+upxiF2Evuwm85FLFfLXcJh/E0MdvrW3ewb8fN0WPmRQ9NvQEBtsfGb?= =?us-ascii?Q?sDXf6Ra+hgoyGwUd2nN3w4zZNBn3l81X3EsYwEtuTTUmA/3JPJeDYbV7hQtb?= =?us-ascii?Q?a/c07DWumCypSChaLn/vMuFEvDQIcn0lDWh+yh26fzqcRWzmPNyrJc1pcUti?= =?us-ascii?Q?jlV+79E1Vw+zrrfxdf0npw6oFszsDxk0kuthYdpaXsM3bES5yLMfWhIXMl0q?= =?us-ascii?Q?IVM1D++atYaH+KpRe77K8EHwcd+ycrwp3AhIdnXnolsHweYQoWp3+xV48J24?= =?us-ascii?Q?4Ee4aeqJELsKZTTUkGzcTPZOgt62uk3+Y0fwIUqPUzOuXyGbBKvICFrH7uNg?= =?us-ascii?Q?/rBbmSlRuFuh+DW9884TF8mWFZZCR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ascii?Q?yxuLW20gStKyYr8lBIFzG21p35YWiLeL8Taik0MJGJsEJqU/7k3qYbs8U1ck?= =?us-ascii?Q?jPEZ79/ZZ/7An6AwknuBrCL7gIYcNfF0z4p3JJeNKtdoc23Htx2TNaXuLTiZ?= =?us-ascii?Q?yqD6IlKHOoGrRpMfzWrQ9OgbztU6ihgTZ6DS3Zx01Tdf88pxLzhrcidrs42i?= =?us-ascii?Q?AINeZ+pnHd0TJ6sFTyS9D7k=3D?= 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: BYAPR11MB3495.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9bf47c22-5440-41cf-2929-08d9ded34870 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2022 00:48:48.2752 (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: s5/yYfXeYdV4tqRq5dz4tYJMDJi1bUtbbfT/gI+/Rh8s69Er3YKtSL2DsGnajBenYcDuVA4CH13nJ5vfkfX0Jg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1101MB2347 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 08:05 > To: dev@dpdk.org > Cc: Stephen Hemminger ; Wang, Haiyue > Subject: [PATCH 54/82] net/ixgbe: remove unnecessary NULL checks >=20 > Remove redundant NULL pointer checks before free functions > found by nullfree.cocci >=20 > Signed-off-by: Stephen Hemminger > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++------- > drivers/net/ixgbe/ixgbe_rxtx.c | 3 +-- > 2 files changed, 4 insertions(+), 9 deletions(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_e= thdev.c > index c8f0460440c0..840509ddd460 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -1322,10 +1322,8 @@ static int ixgbe_fdir_filter_uninit(struct rte_eth= _dev *eth_dev) > IXGBE_DEV_PRIVATE_TO_FDIR_INFO(eth_dev->data->dev_private); > struct ixgbe_fdir_filter *fdir_filter; >=20 > - if (fdir_info->hash_map) > rte_free(fdir_info->hash_map); This " rte_free(fdir_info->hash_map);" needs to be adjusted by removing one= tab. ;-) > - if (fdir_info->hash_handle) > - rte_hash_free(fdir_info->hash_handle); > + rte_hash_free(fdir_info->hash_handle); >=20 > -- > 2.30.2