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 4E340A04A6; Mon, 24 Jan 2022 08:44:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4D3340DDB; Mon, 24 Jan 2022 08:44:12 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 4FA4B40040 for ; Mon, 24 Jan 2022 08:44:11 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20O5tlKV008210; Sun, 23 Jan 2022 23:44:10 -0800 Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2049.outbound.protection.outlook.com [104.47.66.49]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3dspd20837-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 23 Jan 2022 23:44:09 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BhuOd00iGWHyAay9EzRJw3GZld0BNvCekIC2k/xL7LF5kkmTyRv2icp26uSGJTfQwNOTeDUzIuLN3NTL3G7ulpYuxZsnpvQZAHH+xuCI6zHik+vcj+UYN6s74NA3tukXU+/uYCZW7ZRQIETAb5gabLHES0DZ26YsbScfFZcravgAm22Izm1RDSlhQJrImJDAYw+F8g3DItl2cpMnsYc+aXbl7URF9FN6qeOmwQgTnHYrFtHq2WN1bhaJjybCFw35p1frtJQca1sylVFLInstOeqMXrtE/RfSY5V7K7Tmw4R3lT8qZ1QsaspvbX8KsMYwJrkQ/xJwgOCnseB5mCAH8g== 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=K2xmlWCcyxeYFrAmPxkmaT8qtZ1Yh5QJeUK8376M0YI=; b=lSLIJ1ikXaEwlKxUMtjLHTNFvEqJoDPUsClblsolY180CU78owBT7xkh8Ai7WDG1YMYQXJtCaJppE/PRO6vhDveyPaSUQZGqZN9Sg48aEbmQDnIV0yzgOQV1wcsLvgKRIlw1ubLbWEc308bbSjkSzI45yBd4vfEeYHc+WHUttKOp4qiHW1iXsySeJe9cyU/JqkLPHWL7yCso/U5Nb4CztjZbFCcfwwr8ad3rLoS7hlMdinIKhHFbIAq/eCgtT/EsTlk3uES/b51c4XTF299aPBsip9C4oWHGJaaF2ITGCntyr9s7k8MvO3ZbdTJMJjWUL/lZE1CUujjwzxLXCNiOQw== 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=K2xmlWCcyxeYFrAmPxkmaT8qtZ1Yh5QJeUK8376M0YI=; b=AYDch3XmGYKlOD7JePSA5s8M7nty4wN9mUfrsTlxan3c6I+AFE+et5wMuyAhhQXyMkz9Yv5sV4wcEeAQ2KqKCeAYN0cSqYsSZr9HB/7XsKyJvwoCAo2lTPdI+AT5FicEXmRWWSX0rl+4b1P2lXaSXiAbsQ0270xNI7ZldcUjRtQ= Received: from PH0PR18MB4473.namprd18.prod.outlook.com (2603:10b6:510:d4::18) by SN4PR18MB4871.namprd18.prod.outlook.com (2603:10b6:806:1ef::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4844.15; Mon, 24 Jan 2022 07:44:06 +0000 Received: from PH0PR18MB4473.namprd18.prod.outlook.com ([fe80::98d5:32e8:240b:ca02]) by PH0PR18MB4473.namprd18.prod.outlook.com ([fe80::98d5:32e8:240b:ca02%3]) with mapi id 15.20.4909.017; Mon, 24 Jan 2022 07:44:06 +0000 From: Liron Himi To: Stephen Hemminger , "dev@dpdk.org" CC: Liron Himi Subject: RE: [EXT] [PATCH 72/82] regex/cn9k: remove unnecessary NULL checks Thread-Topic: [EXT] [PATCH 72/82] regex/cn9k: remove unnecessary NULL checks Thread-Index: AQHYELZCm7SutR0OgUeTNu8oyVpXN6xxyrGg Date: Mon, 24 Jan 2022 07:44:06 +0000 Message-ID: References: <20220124000518.319850-1-stephen@networkplumber.org> <20220124000518.319850-73-stephen@networkplumber.org> In-Reply-To: <20220124000518.319850-73-stephen@networkplumber.org> Accept-Language: he-IL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3ddc3798-d680-4230-9092-08d9df0d4ccf x-ms-traffictypediagnostic: SN4PR18MB4871:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2958; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +VL3wsWDKyDL88EI4iQS4S5iA7p3/d2W4TR+HLBr6mQw3xavv7GjJuWnlp4OILlvQvVwoNMx+dCx44HPk/l9db30ILVPjQi2cgAvxsGy7twR7S04S1jefbqrqao4JG9rH1XhIwYt2OqWfdQYlt97tvHZOZhqO/1KiN0cOWr5k+gbzh6wcYgDLjAV3H9CMgKM8yqLi1sRxnVcmac4d1FXn4cX0plIPVxBHMSRLZJylp3YaN63QQNlp8DoKID7rxDGuQvT0Z2eH0LTOK+gDWPgEpJwKZ0Mk7qmynxqN9Oe6Po2rweo3udfdFotyX7MVBzwezUwLoxW99aqmh2kwuOxpRo1KFm4YU3dkKwnInJa0EsZpOXXwWTrYSXkpJoQGSUoDx31OUf9gS8xFMrony97MlPFMVChpsl0L12Jk2XngrEX8g6eS+pEOukgNl9Fona5yEZ9C9KAP8NOIIsMpfxhxWTtraD/OEXiuYUUM8YN24GgtbX9FlxlSktqmpNY90VOjJPdaxfzDdBonzl3LsjcXc65YU7LwMUOEjdUX8PNdAQRoyIQMMysZij4loyXabOHT3E6DcdKZ7w5HR0UkYX7E55QOE6biUi1XFc6wNAHlNdBS/5WdmpdChKOD+Ik7OWwcqvzOomXgvFNXjpOrX/+lqKaEzSLTG/EQNC6HCyqydFNtU+gy4VoZEW5msnFw2bS6nsaWVUUnzUceuW7WFdXiw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4473.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(38070700005)(66556008)(8676002)(2906002)(33656002)(38100700002)(52536014)(26005)(76116006)(107886003)(8936002)(83380400001)(5660300002)(86362001)(66946007)(122000001)(55016003)(110136005)(508600001)(186003)(316002)(53546011)(9686003)(66446008)(6506007)(66476007)(64756008)(71200400001)(4326008)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?apf8Bjdzwmcu3Ph3GYgcw+aRsnt744yWtOyYx7DzCi8CYuVQXhbB2kK8JZfu?= =?us-ascii?Q?RwtGQwtHABrJ8xOauY6wnRJgfhCNkIb1ZYuVgil863IhmHXbUeu5RNWuKn4s?= =?us-ascii?Q?q/s+87RbiOvGwPUYnuD4LYdkCLe6qoVtqJCYqe8P3TVdNzMh0AML9y7cdbEH?= =?us-ascii?Q?FPP5sgcSXuojA58hAsx1r5UCggpO0V8qpLox738ec5UdjIXfcpygnHT2j7YM?= =?us-ascii?Q?JUqHvWH/h+wUY5Shnm4kaF/cfspwyNlkQx0S0xE6IUQFocv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AICnCIFAll0YklzYRVGaIC9GCN8Z/purCefjMU/aZjZGYhz?= =?us-ascii?Q?V/UyjKBob5QmlmMlQ7Ns5Qgm2WX0dfKH8eyrJh+tEEgOynvStXIKkld0Ujc7?= =?us-ascii?Q?N+neAWpa6EnKoBIQm+khl3UZdnXdK66E1iWXuFemXkTDx2DxMoR0A9Jk/02n?= =?us-ascii?Q?ApMexBXJuK4Z8OMQ6EFUAF5gEOyoCkRw25oNaxSKcaOplL03xcRePOSO+B9C?= =?us-ascii?Q?mo4OLzInRetlV5MCSUkwKPzAcwwdyO/kPmB8LenNuQWshyFYrq3qL4VdDvQ+?= =?us-ascii?Q?ncDA1i2nYFdEQ1tdgbfwwGFhpWM1lxPPuzzXBa2D2tS+QrzrdPrhSPsXTUVA?= =?us-ascii?Q?mHJbD5Pn1N0TBDue+6Ip75qQ0O82EhUH0uL2QWn+rLWU9yrsHK7l4X2DoiT8?= =?us-ascii?Q?v54VdU+cfnhAn1ozPtfoZzSnmulZ0G7QPtpRdRgoD+LXKYwkigoMQUowYKbm?= =?us-ascii?Q?Ng=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: PH0PR18MB4473.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ddc3798-d680-4230-9092-08d9df0d4ccf X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2022 07:44:06.5095 (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: btLTTome8cS1O2aGrlthv/16jhMt3gyG/VoCm10aEiPZnmJUZfUkURJp93t/OgOgduwPhIevwkIWuDwv7V041w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR18MB4871 X-Proofpoint-GUID: A0E02lfP2-qcR0XlLgAvO2rBGOG3HPOx X-Proofpoint-ORIG-GUID: A0E02lfP2-qcR0XlLgAvO2rBGOG3HPOx 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-24_05,2022-01-21_01,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 Reviewed-by: Liron Himi -----Original Message----- From: Stephen Hemminger =20 Sent: Monday, 24 January 2022 02:05 To: dev@dpdk.org Cc: Stephen Hemminger ; Liron Himi Subject: [EXT] [PATCH 72/82] regex/cn9k: remove unnecessary NULL checks External Email ---------------------------------------------------------------------- Remove redundant NULL pointer checks before free functions found by nullfre= e.cocci Signed-off-by: Stephen Hemminger --- drivers/regex/cn9k/cn9k_regexdev.c | 6 ++---- drivers/regex/cn9k/cn9k_regexdev_compiler.c | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/regex/cn9k/cn9k_regexdev.c b/drivers/regex/cn9k/cn9k_r= egexdev.c index 32d20c1be82b..56c862c5a76c 100644 --- a/drivers/regex/cn9k/cn9k_regexdev.c +++ b/drivers/regex/cn9k/cn9k_regexdev.c @@ -256,10 +256,8 @@ ree_dev_fini(struct rte_regexdev *dev) cn9k_err("Could not detach queues"); =20 /* TEMP : should be in lib */ - if (data->queue_pairs) - rte_free(data->queue_pairs); - if (data->rules) - rte_free(data->rules); + rte_free(data->queue_pairs); + rte_free(data->rules); =20 roc_ree_dev_fini(vf); =20 diff --git a/drivers/regex/cn9k/cn9k_regexdev_compiler.c b/drivers/regex/cn= 9k/cn9k_regexdev_compiler.c index 935b8a53b459..60f1c1b4c4d8 100644 --- a/drivers/regex/cn9k/cn9k_regexdev_compiler.c +++ b/drivers/regex/cn9k/cn9k_regexdev_compiler.c @@ -214,8 +214,7 @@ cn9k_ree_rule_db_compile_prog(struct rte_regexdev *dev) rxp_free_structs(NULL, NULL, NULL, NULL, NULL, &rof, NULL, &rofi, NULL, 1); =20 - if (rule_db) - rte_free(rule_db); + rte_free(rule_db); =20 return ret; } -- 2.30.2