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 6ABDAA04A6; Mon, 24 Jan 2022 01:49:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5970A427AB; Mon, 24 Jan 2022 01:49:55 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id C7CCA40040 for ; Mon, 24 Jan 2022 01:49:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642985393; x=1674521393; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=j5jzv3W76fFdlLvSkSokEpOm1IvX1KmuaQt1ic49AWw=; b=OYz89ysGLeaxEtcW4JkE3N81f1gSVarseUBAeaSQnuemqJhwRg+qL4x5 w3wtctt2FbsNxGCP+vUxz1vJKzWkcq0tH5vfJe8AGrf4ns6UbOrin6qz8 SvELKTS2AvfSYcQCo1oPYmbZRBc2WgFn/2x5zKrH8fVsAyocwx9T265Xc FPjq2IexG8FZsd57kjfWI0c6OL4/Gnv83JQMhbWFo6ZZUdKM8rpnARBiH VL7ha+BoJAVchlvZ20xzJGViVbs1rTnjRwkGl6ArPGfZB1TLfY/K4zQrF cuUfwmsrWtWAGMzIZuIV4i/vUJQN71yRRv8WOrqLPWomVWS8whK0OaQ1b A==; X-IronPort-AV: E=McAfee;i="6200,9189,10236"; a="225916506" X-IronPort-AV: E=Sophos;i="5.88,311,1635231600"; d="scan'208";a="225916506" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2022 16:49:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,311,1635231600"; d="scan'208";a="766232777" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga006.fm.intel.com with ESMTP; 23 Jan 2022 16:49:51 -0800 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) 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:49:51 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx605.amr.corp.intel.com (10.18.126.85) 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:49:51 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.42) 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:49:51 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C6yVCozwzZsgP+fu3eOz09X5z7eF/PMXqcrJ8rBZW8id7dBHi+Sk6lAeLfC7PywqMWGo5yJ+vsSz8uquqTgPtA0tAw3Xj4x7dPqmZZEOhpeJimSZLCNMQFxzFMULUpBBf+hehbjdkpOHTHFICi16Ausr32bwbGn31IPPBkHqxEhioNqe2+KVkoq6JWVHYpiqqceCskIAxqDlWXQs4QDYjuSQjg0TG5+VHSRlLhz8naShOObEzmdrW6TAGxCVs49vKRT4VZ5EgFNcPeKLEVW/JUSjeTdxg9JKH06ieWm0aJHV3o3bjDCs+o/et/0oJhelaVS/AkfNUyRuchC8mZDaHQ== 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=c8om2QlePPgVGQaQvXKropGkFUQIvOpyyJEkpZ624KI=; b=f6rh8OqgCL9y0o914erdjXEhoY5M4PSrpsLQmn5czxhVMvJ3KC1ShsWy1A8D5naVo7yQVxs60blrPgreFOAjscvf6yG7Lj/GT+e/UNKJvUwCEeai4YINq2gGiWnjgLlkRwJ/AS/0i1GiTDVcxVqb4F3uGCNAaZbZsQv1DjKlHbaHFD5nrLSKxrbpo2Ru0gDS/X1atZCXmLTtaqBQBRv9lfar2urNy0JZpW+vKsZu72uQibXUdZKQ4/Lv5MYQnl7YQzmZ5IrMNpVdiN6CYeu082nT/NIvFGNDLwgqn6N99YH9R6r/9XXtfKxH/h7PJXk3TCHh92KrvjMEXSYFyRwK1Q== 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:49: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:49:49 +0000 From: "Wang, Haiyue" To: Stephen Hemminger , "dev@dpdk.org" Subject: RE: [PATCH 53/82] net/igc: remove unnecessary NULL checks Thread-Topic: [PATCH 53/82] net/igc: remove unnecessary NULL checks Thread-Index: AQHYELY6T/4CFcPodUGDQa4oQr25NKxxVuOQ Date: Mon, 24 Jan 2022 00:49:49 +0000 Message-ID: References: <20220124000518.319850-1-stephen@networkplumber.org> <20220124000518.319850-54-stephen@networkplumber.org> In-Reply-To: <20220124000518.319850-54-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: 477c3c45-f0ac-4ff0-f06f-08d9ded36d05 x-ms-traffictypediagnostic: DM5PR1101MB2347:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1122; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: YoADeTce8sEbsqPKTf8hq1ZaJyPuUawlX+08wXeuzYlkjNzmTYz39s5TCHuEGKFU6cH6AH+o0LaTEfECA3qrGhZZOvX0qrxjTfxi2fBxvFv6aTxwl0FSK9W2e3IIUzYO+X5OfBz3Bq4+BOlp5DCwTdTK0Ohj+KMMMsipsCVgSNgRO+VcW9GIheH35xcrfP90pY9RluBhK2triIbpnRUc5vQmiMkGkjuhkl0W2eiTS701hDY4he4io38q4aMnhWd596dPVNVMinf1pg62E4jLKBzHZDrzC13GHoyMlByVahTjPEkfCRI6kxWeagK7awUnL8SIf6KxkQsQKZT8bMHv7KcdZReUpEezNcAtPe/P0PyFno7aLZEgQ4yifscP8GkuF3MGJfZi9GJ3wrKR6xVOOJrdPqVq/wtfoew2vzJbJ7DIZE+TUEfWDNOr6T8C7zWS9d2PSCWiG1CBgQwKUOFa/P2ucpn6brqPaLdWGVr9U+n/C47FIZCJQ6iGPX0X00RVxrxoj1vKtx27LLmSRNZEIEeHj/tGc2+dXJOO2+JuIS6aDeZ7zyoNoj6d3LbmHD82ur8PT9snok7WsUyaYni9a/h0lQwPu6Yf+OhOgRtCEIBJ1tIKRoNJKLulH65SaNF6EDtDtVgJwE7cFFO9HXlK6LCbV/uza0/GNe4/6jDbtKyD4NS+SqDOSC9e3zGESWE7W3TKqn6lzVg/U0sxBdDboQ== 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)(4744005)(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?NeEM5bjaRDSbEVFckBGQlHIbCj4UASSj0OBZ6HVwROZ1Eqgzgkfy7by3vLDR?= =?us-ascii?Q?b6V4b4i1/dSoOrhm+1LA/9gkq1GVXv77e66O+WNy7TiLPbQex0w9Ci/X7lxS?= =?us-ascii?Q?Hi5SKAhTzGT0bTHS+5AzOeN+r2XqQfa8acaX0GdbBg7XbuvfNRyTqfMe3f/v?= =?us-ascii?Q?VVgSoxCgUkc2ONI6QCi6djdK9FDYUqBtb/uYui4lpXrDLnfj3+4bbBY0+Wqn?= =?us-ascii?Q?NA+FlVTNmIdxibBLSUk1CJjkaI+lrAZSYdh0eftk79GboEZSvBl75izPYb+j?= =?us-ascii?Q?/uhjOolRb/snn1XIOu+hmf8uBZcf9hEI0sKVrHFpfMVg7PXhx/OGVd45ndhA?= =?us-ascii?Q?n2Kr5bjJUaZOsuv+wvf/RFGzPAxeZLwiM8KO9Wr4QgHtZ3Y2pWVy0rTNdDqb?= =?us-ascii?Q?T+s+v3ADMr8Mq+YmX+paLpax6XpIfLXj85kfl6s2UIIHAU0ZKI2DwlcbSJ2u?= =?us-ascii?Q?KKuvK1ai5yX5b6qEqWR6DRstXjJDoUmftJj4PFRKI08gShFo/8MF0n0qcObg?= =?us-ascii?Q?Tll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hyUHlwc1F0h2p6iEd6Nc?= =?us-ascii?Q?47ExJ3dRSz+So9mN8RinXZ5PBGjXf2vCyAULVH5kSDE1VvuHhS02eKJ5v9Xg?= =?us-ascii?Q?U/n9ezmicqNXGAdpCxsLVBtJZ63WHc7Cb6rMuEqEgSBZP2bcRhVn2qSE7Vql?= =?us-ascii?Q?8fAN3flYNhteU7NvG7zPELxRHzwPlPCCA2+Ci9uqbZQInnZmokJg84sN3uPg?= =?us-ascii?Q?2pPTHPhE+OysvWbXCAEXE7s=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: 477c3c45-f0ac-4ff0-f06f-08d9ded36d05 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2022 00:49:49.7377 (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: rdlkVPM6/4SUTJYtKr9+UuNMcCztiXMrmUGwt1UL8e90HCG98HgzV4kfiFJpGIygJQrGcfbmKGcAxo61/fdQtg== 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 53/82] net/igc: 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/igc/igc_flow.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) >=20 > diff --git a/drivers/net/igc/igc_flow.c b/drivers/net/igc/igc_flow.c > index 66053060af5a..88978ee0e849 100644 > --- a/drivers/net/igc/igc_flow.c > +++ b/drivers/net/igc/igc_flow.c > @@ -776,8 +776,7 @@ igc_flow_create(struct rte_eth_dev *dev, >=20 > if (ret) { > /* check and free the memory */ This comment line can be removed either, since 'check' is done by 'rte_free= ' internally. > - if (flow) > - rte_free(flow); > + rte_free(flow); >=20 > rte_flow_error_set(error, -ret, > RTE_FLOW_ERROR_TYPE_HANDLE, NULL, > -- > 2.30.2