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 6358AA04A6; Mon, 24 Jan 2022 21:11:07 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4994741182; Mon, 24 Jan 2022 21:11:07 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2136.outbound.protection.outlook.com [40.107.243.136]) by mails.dpdk.org (Postfix) with ESMTP id 75E8240040 for ; Mon, 24 Jan 2022 21:11:05 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hmXM0YFnARtr8KxOZSgHXnl6EA+g1+fzx3/VQDBl/GPBFR1Te0n0SyEB6MYehBB1t5mqc6HKThyLEH9toChEyxGmcwEOZJmN5uslZoxxPDXRMZshRDARCgGn4mwsSexylnjJH0Q9eUiiC+daamh/VoT4QKB0QHvlx1gT5lF7gZ/Y6Zx2EvHAykOcw5tXRA7W4lTalLS5OcJOmZE6Em0RCC2xOc11ECDkgJh24ztss/pOrWTQ+BPceCQIMHRBceTXaevy0psgYesz0xXfDp4YmQ+WxTeY2LubTVwB2cG90VDLeP3ivl6BRHLWKzpY0VkBkgO3t9al9ALbf+efieEqgg== 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=13hUlS2z/u52//JPTDwfYn2ZvWNux8TDUyzJiYKs5co=; b=cDwABlexPUQL1lVcICC7eL4hZj3v8pmn+wEAy8fKQszR5HppfiWTpbbtDxufzSzvB24c0HCE8yqCvXVB07XJ46wbRdJWBuURxXaEQXPc3s8SuX6ozneJ/9kaLxt5U/V5tFztiTMzr+s2aMZzppQq94cHbrfceiOjsgw0uGqRNezNyRA5LjwLIVXPgSyTmm1FNoYZsVwEn4SB3dsGhnao67GFhGqm5DAAV8VxJWRUSrjO61MWvEbV6UEw/rtrFv3i+cONZWW4VFLLV1yfrOf6DWczz/tcIq/eUqBwzsZJywgnYjriMglGnH6YITv+3X9gHHxxb3EXB4SwlXXR2rvpZA== 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=13hUlS2z/u52//JPTDwfYn2ZvWNux8TDUyzJiYKs5co=; b=gAFATh7tCM+/04ptWZZ/G9n7P9bPsdBzTJWze1+GMeHnvdf5l2TJWnI032/xb5G0kNiUaaB8pSnYrW/vAkKIb/uV6pmV5oeoFPPAi6vHZqrWIitRzETkCkm0xenXmLCJ9SVOR7SZfV+aPlohMMW1dHNBAlDSC2tjiPpfMa81148= 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:11:01 +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:11:01 +0000 From: Long Li To: Stephen Hemminger , "dev@dpdk.org" CC: Stephen Hemminger Subject: RE: [PATCH v2 60/83] net/netvsc: remove unnecessary NULL checks Thread-Topic: [PATCH v2 60/83] net/netvsc: remove unnecessary NULL checks Thread-Index: AQHYEUqZwdjxNwK/gEKnN/QfX/OSSqxymlDA Date: Mon, 24 Jan 2022 20:11:01 +0000 Message-ID: References: <20220124000518.319850-1-stephen@networkplumber.org> <20220124174719.14417-1-stephen@networkplumber.org> <20220124174719.14417-61-stephen@networkplumber.org> In-Reply-To: <20220124174719.14417-61-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=16303b6b-ef4e-4c65-b361-1bdbd4212437; 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:10:35Z; 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: 601434a0-3bee-4968-08fb-08d9df75a4aa 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: s0DQ7fiiTuOfzoh15jD1fjI9haXBhOvCQaGf/c1Uq+8jLIR4GuWYGkhL1v2rI8vzAcUP6fatxJ2Q7X6LlRA0tVzh4wJbk2+VZmy65UldrG2MhQdyX2psIB5FxhQXu/Qcxtj8D0wH9aaw1sQ0gPrF90hmrN24TePZQntUGJL+PzGu6A/03jokDk8EYY1EZtqoaZPQLFr+D1VIWR8FF/UKXpS+pXpq91LQxE24T5e6hE8RAU+NwHm4lJdDuFDBX8MITCPt69A8ewGYMw21vZU2Tiiczj5xCnHiGDA2J/8Ci8kSye9GBywHwCZp8ZJIxgFpxeyKKsh/e2qVZU1lp/NBJuFXI/qWzG2FijnRJPRZ7Npck8vxgUBlcGbKzJx7QCN7ayP1/g54FIBcTTApKpyg/HI9REcsoNneoF6wjbFY48uBeSrbkaFPa1uNYHlsW7+wGilnw8z9Nr2pzijZ1m5pZcn4YLgvEfu5K0XPWunlu2icn1LsYtdcNLWIpItp4iYGawi58FFjVH+oSIy6qyC5bKxGZqanXuSAAOCZmJlYLdF8pK5sa4xxogAKLDDf1JqyLHk+TGNF1+js3v+YsqLHvK/9VCrahPfb/Pmml/IHRsTyTtO76X03033XivzbyMlM7xoyIXtZsAm2K7iNv8yanx9sJNhvxoHKjfPfZbeNXObgGAggz60ie6XdzLCfpfMIQGSLWWJQYDy1AomwlGK6axd2gMRIHpuI/krakBDvQHymWFRJVHmJy21e3uCeQ3tn 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?f8nSPGAoBLsWuMIVxAtVjca6umaF4VDtV3rzxvJ9EGH+IdKEfEn6BsPculam?= =?us-ascii?Q?jNI5WLpUB3glC2j+7g2YgepvhVT7vxvOEsEMoYwRn84DL2+yIthpXpDDtusK?= =?us-ascii?Q?19IxF4FRY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yOrr5AD?= =?us-ascii?Q?KwraMLns9ka7PTwt304XiJkeBOe6FFMZOkAx/PXMHD4f7BqHqaOt9m3B4U1X?= =?us-ascii?Q?G8DXzEkvC5Qpv2sB/LVTtklyC86OzoG9kOyhbY7O+qiZP6e3w6mJ9eFIVAQ8?= =?us-ascii?Q?yZEa7iyUWnae/7qjf1jBh7ZytPzrinFUBFBvgatkOOQiYag3WTGlpvkqA+CJ?= =?us-ascii?Q?EfOXrwtZIpcFzi6nR+Qfj2LOAp2IG49awosd3Ul13kzJdXc3O1sKCAALLlGq?= =?us-ascii?Q?O8UNQrlYWsXAWBHLqN6/c6KHl2jdyAwn8zO7F+nu8g5VwZczLJIKli11qgpt?= =?us-ascii?Q?KLf1ue3BqIkh03BKGM/cVYtGELWMbqcDwNuZdOYZpPW0qUQldzizu9x3TvCG?= =?us-ascii?Q?TBbuQTOskATyO5n5aLUNk3OSg1xCHGZARGuKW49IXgocNU16inQxFcqTwtie?= =?us-ascii?Q?uiGePxb/FvfRWWUmTOA6RWQN4HbbS3Pj9EiRthD2i/PVN+qQQN2UWCMZGBVN?= =?us-ascii?Q?K/6Cz3ai50lrG1UZmHvv1z+k02HE/pX7Mm8Jx3rHWoCBHTR/MFLIeWSGBG1j?= =?us-ascii?Q?o3A8bj2D8seqlrI8aOm/pVTc8pNsGTI6FHTTYbxW1PAAeIvf08ZKlGW6EubP?= =?us-ascii?Q?hA=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: 601434a0-3bee-4968-08fb-08d9df75a4aa X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2022 20:11:01.5060 (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: HqG+4eilJkl5riS5Ohc8rxap8OdeuSE4wr74Yu1ypH2fwVb7MI3d2ZjeCa0Zb4JRCvSpswtLhcyHfTDtEdmZYA== 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 v2 60/83] 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