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 63A60A04A8; Tue, 25 Jan 2022 04:53:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 220AE40E09; Tue, 25 Jan 2022 04:53:46 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 9581D4013F for ; Tue, 25 Jan 2022 04:53:44 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20P3L5dK011985; Mon, 24 Jan 2022 19:53:43 -0800 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2103.outbound.protection.outlook.com [104.47.58.103]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3dt97n02nr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 24 Jan 2022 19:53:43 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bPn0+02s2ngnar6wdzhKiDqLYK1n9vZ+2TfGED9MyY+yo740ix9Ja+O+eoeURFNSEY3BAG3A+Rr2E3Cb/u82Fig8iWQOiB7+MkGVtuXlPBMSFuaSwY8ljDGZfVt7iet+kokUNaBjlgAg6lQ48+L1sccmxj7LA2JGPY0VTNXWS2fqL9mSqlUUEegWscjeDejoUQvwhakdXeVGgoLp/SwFD0HedpN8VrDmMhxyyrA7bepfVBvr+NEyFoy2tW8ELu3agglGZkzj0rebSOdnaDpa8sxwKa8yW2ZIoWtVB7Uj7XGYM2h2f+cab9TRXEMKnJrdr8bwmYp/k9BHTWBRNeqJxw== 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=z8MSe/0QSSmEJkI3UozpEyBf+azhTi8zGPjchu/4xBw=; b=b5lFxEV1602DiAz7tfgeT/REBFOmklJ3V3iQt/Xn5Li+i2GsPbZ5CQ7Mk24+XBtO1PGhO3/snAsvx0sDMgMR6DCNdIJ20V9dPrj4XUesLMbXlysQ6NuHt8pdAo+Rc4B3jTpXJ4HuspAWdT5ESQboD2y0tBSzPIdRbgZiqRSNG8YpSqbtOAh6Z/1pW0UUMWxjwwiIS6VLrHZ6YvDW1xAUZkF6tXTPraN9xVl9JkAtN6KiCECuRWU6a7At/kWvh9i7PTKoW9mKIovXhUzDpOHIV/Ol1tzx/rGr6/uFxIuY0vE22xK/nN0MZ1IQYrhDwWan47fd+hnnjFthtycN+CgE8A== 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=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z8MSe/0QSSmEJkI3UozpEyBf+azhTi8zGPjchu/4xBw=; b=pmWnR6LqUZmsMbLrQLJnMp+nAwPUqtGqEZjEUcFo3ioiuf2rzbfmelaFk9Nvy9g18koGQevxOrkrLbnR4IsM1+x1TbOjBU7g8JhSrlgEZuc7feovcEc4VYfa0tT6A26eRGImGJNxMLppqTRcpEScNEfE3tg1grGEm0pIXTYSbSY= Received: from SJ0PR18MB4461.namprd18.prod.outlook.com (2603:10b6:a03:304::14) by DM6PR18MB2892.namprd18.prod.outlook.com (2603:10b6:5:171::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.17; Tue, 25 Jan 2022 03:53:41 +0000 Received: from SJ0PR18MB4461.namprd18.prod.outlook.com ([fe80::d528:419b:307c:ff1b]) by SJ0PR18MB4461.namprd18.prod.outlook.com ([fe80::d528:419b:307c:ff1b%6]) with mapi id 15.20.4909.017; Tue, 25 Jan 2022 03:53:41 +0000 From: Devendra Singh Rawat To: Stephen Hemminger , "dev@dpdk.org" CC: Rasesh Mody Subject: RE: [EXT] [PATCH v2 63/83] net/qede: remove unnecessary NULL checks Thread-Topic: [EXT] [PATCH v2 63/83] net/qede: remove unnecessary NULL checks Thread-Index: AQHYEUqcomwE/boyqkuA/g/KHuu1dqxzG2Cw Date: Tue, 25 Jan 2022 03:53:41 +0000 Message-ID: References: <20220124000518.319850-1-stephen@networkplumber.org> <20220124174719.14417-1-stephen@networkplumber.org> <20220124174719.14417-64-stephen@networkplumber.org> In-Reply-To: <20220124174719.14417-64-stephen@networkplumber.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 419084cb-17d6-488f-49cd-08d9dfb646e0 x-ms-traffictypediagnostic: DM6PR18MB2892:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:175; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: XFNZIQksanqo8p3ZhY1Smust1e8L3Y3ldby/h284DmwMpLGOVU9ctNL6Z6+/inQLcvtT++B+YHBTJMeoA31ilCT5mJNdpikAzeUCmFgmwgo0cifsV+e6bxbk2pfdqfcUyEehQOtBwf8/gB8UuMQgMAbl5fJ0sn3yzWsSvWpCUoTDMNL+amOmEldNiCSEOzbHlqZLRb8yi/iEJ4Vu3mEUDwq/MPB9mQ8/gWwky5ksLio1qcRTt66x63UrL/t0f4rJgJi+QjnkIf7FPdp2gX6+CMYQNZ0jv3HnBVwHkyvBH9cV9WdR7atQHj6MxotoOUB9lQH8bLM7vms6hK92cfTb0aF9sLK4XIWop6EgUSJdMC/j7nLPOXkUvBN228RC5QKCwFfa9o3fxQok6oeNU4SviiySk4ndSH1VIEZAFQD+bHAWvOkNqnFEB+kGu+NmcVyPzJULG1zWhMkl1qqK780sQH7K4fz6djDIWLr8Ye6Ajiop5c9pGytcvkDKINna8bzMUqpYxNCVB3JFdFvqNxqAAyEbolusPmDfyyu/LpGPxXjWUEQn2iE4VYCtnsM11sGpo5VWBSkztEil0gVtByJ87PQ4FNvQ0Ux9VQbTyPdEWAIaqKFb5+wMTLpbL6hkXukWs07t3Jj3JuWSunHNMIVq8NVXdBwcwDwZlaBwZk1DicQH7kT/8K40rILXbB/nU9n+Zl/Om0ZzmFEJKjB+8MpcQg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR18MB4461.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(122000001)(33656002)(53546011)(6506007)(52536014)(316002)(107886003)(76116006)(7696005)(86362001)(186003)(8676002)(5660300002)(110136005)(8936002)(83380400001)(38100700002)(4326008)(26005)(55016003)(508600001)(66446008)(66556008)(2906002)(38070700005)(64756008)(66476007)(66946007)(71200400001)(9686003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Wl35CMimbqisHHYrNzkfRNwHCcUZ4pXv35yR6GLJjtHWX5/fdm9SXxlcMjbb?= =?us-ascii?Q?AfJMLYeRs9+2UUWB/01BOReGxPlTj960YmP+wyB5zwptGnhVOw/vExgTjCUm?= =?us-ascii?Q?UFhc/iwKTa7CFaDYu0x5q/7XVvwD8sesra72YTGrk4++bNZDEvm3CBanSVjx?= =?us-ascii?Q?YEZD2S+i2/47y+MrGsRn4HaknhGhLSla2pBQ5ZxVqlfvV5k0yeW8/wrKR/DG?= =?us-ascii?Q?Tma+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Wm1B?= =?us-ascii?Q?03rA12O2k4+WvYOS/a/7ReBZzu923Y0u7zGG9ZmS71aBpsPFOeqo8/35SsWy?= =?us-ascii?Q?r+x8Ar5wB3QRvC/mI38JoIoRUBZBxgr807J5woinZT6nxKslVEqtrsuhzYyq?= =?us-ascii?Q?WDuNYjHJw0MrwJxdEg3ne2bWG/vYbRSNcxgtyafT5oOtRCT/ZCeEgjJ1C1yg?= =?us-ascii?Q?R4UHID5XGDxU+BNxFCSFv9UkMKrwf9123vsLOUv76sN8o1BTWS4VzEGmzXcj?= =?us-ascii?Q?xFVMzRg8V+5mdmbcKTmgrMAQPPWvWP/fHV60u96sRJ7iqJwnny1w1lKS1HGP?= =?us-ascii?Q?MoAP9SJL/tq6/bEFxvHpUtQiA529zPXdrwnOde5WtvZBADyl2EyIPlgjQVGM?= =?us-ascii?Q?zYg9gUIlwsUvx4W47e71jCQ0CJlTu9S5peSMQyKsQLVs4V996+vieA3z18Mg?= =?us-ascii?Q?1WislvSMMrxO/GP1NaVc3KiTCFYrY7Q086o1139hipnoST/yRMttaGfnXDcl?= =?us-ascii?Q?QQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR18MB4461.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 419084cb-17d6-488f-49cd-08d9dfb646e0 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jan 2022 03:53:41.4844 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: rK2Jh54JqA+ngY9k1pJujb1ZvU4i3PGc9yt4PzyBi4BbVmInt5dQceRj6P4oT6F9oFP4MlXCpuvr7WTpaLM8ow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR18MB2892 X-Proofpoint-ORIG-GUID: Nc2HBBVTfzkl-QuabUhSegL0fs1mu3U6 X-Proofpoint-GUID: Nc2HBBVTfzkl-QuabUhSegL0fs1mu3U6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-25_01,2022-01-24_02,2021-12-02_01 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 11:17 PM > To: dev@dpdk.org > Cc: Stephen Hemminger ; Rasesh Mody > ; Devendra Singh Rawat > Subject: [EXT] [PATCH v2 63/83] net/qede: remove unnecessary NULL checks >=20 > External Email >=20 > ---------------------------------------------------------------------- > Remove redundant NULL pointer checks before free functions found by > nullfree.cocci >=20 > Signed-off-by: Stephen Hemminger > --- > drivers/net/qede/qede_main.c | 3 +-- > drivers/net/qede/qede_rxtx.c | 6 ++---- > 2 files changed, 3 insertions(+), 6 deletions(-) >=20 > diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c > index 2d1f70693a3d..ad101194d613 100644 > --- a/drivers/net/qede/qede_main.c > +++ b/drivers/net/qede/qede_main.c > @@ -335,8 +335,7 @@ static int qed_slowpath_start(struct ecore_dev *edev, > err: > #ifdef CONFIG_ECORE_BINARY_FW > if (IS_PF(edev)) { > - if (edev->firmware) > - rte_free(edev->firmware); > + rte_free(edev->firmware); > edev->firmware =3D NULL; > } > #endif > diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c = index > 7088c57b501d..1c0a6ba5f1bf 100644 > --- a/drivers/net/qede/qede_rxtx.c > +++ b/drivers/net/qede/qede_rxtx.c > @@ -706,12 +706,10 @@ void qede_dealloc_fp_resc(struct rte_eth_dev > *eth_dev) > } > } >=20 > - if (qdev->fp_array) > - rte_free(qdev->fp_array); > + rte_free(qdev->fp_array); > qdev->fp_array =3D NULL; >=20 > - if (qdev->fp_array_cmt) > - rte_free(qdev->fp_array_cmt); > + rte_free(qdev->fp_array_cmt); > qdev->fp_array_cmt =3D NULL; > } >=20 > -- > 2.30.2 Acked-by: Devendra Singh Rawat Thanks, Devendra