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 6378FA04A6; Mon, 24 Jan 2022 21:09:36 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DFD5E4117A; Mon, 24 Jan 2022 21:09:35 +0100 (CET) Received: from na01-obe.outbound.protection.outlook.com (mail-eus2azon11020021.outbound.protection.outlook.com [52.101.56.21]) by mails.dpdk.org (Postfix) with ESMTP id F3C7240040 for ; Mon, 24 Jan 2022 21:09:34 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ObYU9oZKneimQFpUoy36gHhOFhbF9O6xYt7XMvkpERQCIXUCN/0Ukq8Pk5t6Nx9w12MWw2h0T8xcJKPawxVa+MRdwoNCyxr2XcBL5xW9H7LDdT8E8A6u/1shtToK+r8erUDTx5repdepm6S191btlTHaMbXEPDbGxz6mlYLK0+/k2QymDRi0Cb6xChyEVeelM16I2xYZcVTh3uvPVU+DNvUVvRckkDxWc8tWW71qI01QlRqULpcaXIIoU+ke5Fpa/cREpywNpM3IpKxDcTl1Dfiqu4lMbnvpDYef+b2yTlMIImW3qJ+7xk27TzmlTAIcuYOluA8o6KDt1deOYvEr5A== 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=BVCX+t/EDXJttqWxrJzJ7W/cyij2Re1/KC1+8fBVWWc=; b=MpyG4pjUqgoaRESMiJdMAN7ox8YgC5RJG7TntQOlM0rGq1I9bzNatZZavemXNRDVuIKHVf4TG9de1x0BLAgVWsVWqctXb3TvsfHZHsXGtc4zAL3LyiHLzu5OXc5n2G4RhWkZm/cSprk9J9D58iv71e6XZCiRTY2f1mkbbLW0WwM4gV+u0wObLD3gBtb3y02vxymMBNw1tHCybMh1JWfKZ0rHRUlBQtkCqnezcX8rcxcop97AM1nLm2CcC5m7QlNoNJRk7Yw8QCTBnMXN3C6pGnayjLcVi/EtfSek8FklMnRwT+juZkH+Ame5SCUx6iBA5AY+vZsAMGg2l/RYjv3pMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BVCX+t/EDXJttqWxrJzJ7W/cyij2Re1/KC1+8fBVWWc=; b=XTfJh12gK2lFQLwB1L79zrUlXORC0TC71jAg7ndLMPMCmAg4MGK0RT0HSpp8WBz1hoo5uiZPpntoqnefrKlUBF78UKrAY29NbwTKQTCP7iuA5j8U5LuQhEXY1It8xsnAbByppbHWvOCuc7BmlmRrBZQkfKVkGh663kWrIQXEX8Q= Received: from BY5PR21MB1506.namprd21.prod.outlook.com (2603:10b6:a03:23d::12) by BN7PR21MB1731.namprd21.prod.outlook.com (2603:10b6:406:b7::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.3; Mon, 24 Jan 2022 20:09:29 +0000 Received: from BY5PR21MB1506.namprd21.prod.outlook.com ([fe80::740f:6146:70a3:f030]) by BY5PR21MB1506.namprd21.prod.outlook.com ([fe80::740f:6146:70a3:f030%6]) with mapi id 15.20.4930.009; Mon, 24 Jan 2022 20:09:29 +0000 From: Long Li To: Stephen Hemminger , "dev@dpdk.org" CC: Stephen Hemminger Subject: RE: [PATCH 59/82] net/netvsc: remove unnecessary NULL checks Thread-Topic: [PATCH 59/82] net/netvsc: remove unnecessary NULL checks Thread-Index: AQHYELY6P4V7kMnrRk+AN+HsJKXcVqxymszg Date: Mon, 24 Jan 2022 20:09:29 +0000 Message-ID: References: <20220124000518.319850-1-stephen@networkplumber.org> <20220124000518.319850-60-stephen@networkplumber.org> In-Reply-To: <20220124000518.319850-60-stephen@networkplumber.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=50a91e7e-50e3-466c-b2b3-87e46a96c875; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2022-01-24T20:08:11Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ffad3cdd-2db1-4975-be0d-08d9df756df3 x-ms-traffictypediagnostic: BN7PR21MB1731:EE_ x-ms-exchange-atpmessageproperties: SA|SL 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: Wr76qkyqxnNoRDTzjvpnOzYIw2sxHDfUqh+Qd4VrOJlBM72UQF4RXS9rUuVrQsNmspAmHhbiZHTyJXVNypbQO6iLyUcdUtyVnjLUrqbsZlzfDos+cKX/iBJAkSTe/oBXtsRrWJvtYhlbXKrUUfjK5RFCuYHprHbDqHkEJJiCivEvxwW+0AF2Pw5dFeL6FEQ1TCKcxndXQwxb8ebRbGNKYKbBytr9HUlB9s6U7KtIQMbyoENA+2ZhHgmPimGepczRKWosn1B6CkbkHSbTxMC2xm6X7TP4wFYoOSmppm93JqmnX1hN1lbV0swnVMrPe/40LS/01TdXdvEW4rdFxAhuu2pyBp5HJHvnL+qlo72r9DUYSppZ3L6Umb+qOXp0L2GgZ9KFAhutGMJNneDpYmdvX3UQK86FEck5t1rowHmHbD0CBkO1f026YCgbhE8UUb7T+NKfSflJ8vzjXcxe8JG2Y9ejDnQuUQ2ww0l8/F5U0Kyap4xODGQVtS1jsYJ/PpFXupIibnzUPzUiTEtnI54/qmQq7tAmZsiZVhkud+w7XEyYPtH+GM4KP3c6O9aE6v7rNqlzNpWDoM9mEkJRIBJW662VKzkgzG8SMFIIBiILtIS99tLAICM0Zwv2tyrbaZcBsn8rtG5ubU2+shVg84+2OJqAdpN5YRnAklp8EIfmvCXEuTPRrn87TD2H0+7zGaRbFe1i/oYfVJDVaYnlMRCnz5rpKhYG4yKeAK8nxTbSOl/eLsaYk0xqezX5PFF57HoQ x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR21MB1506.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(64756008)(7696005)(33656002)(38100700002)(8676002)(8990500004)(5660300002)(6506007)(4326008)(66556008)(83380400001)(316002)(66946007)(9686003)(52536014)(8936002)(66446008)(66476007)(86362001)(122000001)(38070700005)(107886003)(186003)(110136005)(26005)(82960400001)(2906002)(55016003)(71200400001)(82950400001)(76116006)(508600001)(10290500003)(20210929001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?5BbQrnDkaQhc++9PMkY3LPPloXkkFHDGqJj5/9rvUG681NJKLXJjVh1cDRxX?= =?us-ascii?Q?Dt+vYbLaFwPNZ2IcVNHXaZb/RGSUEbodNkFwAozLRyDoTNJQT3h895HIPLZL?= =?us-ascii?Q?XWkaYg1PgOlD0GSRcuVPKjtQ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yJkva0?= =?us-ascii?Q?eUdC1fN/Yw3M0erYG/5NM8TvEoF3J/CPd5RPBwb/1J/fgSbIh99ZcAJ+hNlN?= =?us-ascii?Q?HmG1Xp53U2aet/S//Kofd6SL3uYzg6E229HsnRlNZaHJyqPfyIoRc/iFGnuM?= =?us-ascii?Q?qqA5eMxTaK6Bbn/dX8QlolBwpvYM14cnoVraJO6HHNo1GrINzdl8g7B3E65m?= =?us-ascii?Q?RjtYGeYmG6oXRkCEAOVeteBUimaQIY6XmmPmJAMytRhg0DoZNh8cgu/7U29C?= =?us-ascii?Q?bslRdCcnAo/he+xHqscq7z1UzGbfFpjm9CWM5yxL1LlvOxp7DiXRNC5qNZFq?= =?us-ascii?Q?mgMsBCw7fLtehFCoeEcNskbBkOgNNEGiPFShGj0zBKfb6eJugLmslMFVzhQk?= =?us-ascii?Q?ghKFl9ix1w9x2lyyIehE8CVDK1F8L5rhlLE7II3zmp0Gt77TMjEymRyXziPw?= =?us-ascii?Q?1XppbU2BLGhuYi3q5FvlunJwqbmIxk2LAD0HKSlha379yyI36TbCGLbPfE9G?= =?us-ascii?Q?yg4BUM5mAvOpbzZzsvf+e/9qbEDZdktpZuVOjGnKexQaZtaXzAI19rrGXnsP?= =?us-ascii?Q?SjE5VL/y7v+lITn/k8D11NmDeu97W5LvRGyxcEJTUVgi7DL4dv+Xk+ktn+28?= =?us-ascii?Q?Qg=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR21MB1506.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ffad3cdd-2db1-4975-be0d-08d9df756df3 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2022 20:09:29.7244 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DRmUuN8N5HIDptM0n8DdtMSDuQy0bzN4iZRY41VGWIipnLgjzoQm4MLOXPFE7Fv0+ZazpE4tM6oBStVJMMvoew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR21MB1731 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 > Subject: [PATCH 59/82] net/netvsc: remove unnecessary NULL checks >=20 > Remove redundant NULL pointer checks before free functions found by > nullfree.cocci >=20 > Signed-off-by: Stephen Hemminger Acked-by: Long Li > --- > drivers/net/netvsc/hn_rxtx.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c = index > 50ca1710ef3e..3e3488f1b87a 100644 > --- a/drivers/net/netvsc/hn_rxtx.c > +++ b/drivers/net/netvsc/hn_rxtx.c > @@ -315,8 +315,7 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev, > } >=20 > error: > - if (txq->txdesc_pool) > - rte_mempool_free(txq->txdesc_pool); > + rte_mempool_free(txq->txdesc_pool); > rte_memzone_free(txq->tx_rndis_mz); > rte_free(txq); > return err; > @@ -365,8 +364,7 @@ hn_dev_tx_queue_release(struct rte_eth_dev *dev, > uint16_t qid) > if (!txq) > return; >=20 > - if (txq->txdesc_pool) > - rte_mempool_free(txq->txdesc_pool); > + rte_mempool_free(txq->txdesc_pool); >=20 > rte_memzone_free(txq->tx_rndis_mz); > rte_free(txq); > -- > 2.30.2