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 4ACFEA0350; Thu, 27 Jan 2022 12:08:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2DA194279C; Thu, 27 Jan 2022 12:08:06 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 5885042793 for ; Thu, 27 Jan 2022 12:08:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643281684; x=1674817684; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=kMWurN3jGFlgUx4XPQL3dmCk8TcG3/ML7TIDTTZQgKg=; b=cHsSoSVvXKkXWlxyQSJ+AvQIJzEq8+kJcf3z+FLD94MDo3AE5luakS06 PqCAZpadRr7/p0JuIFR7jf07lfGDbyId78bL1sDA5DMYTzVl+0okc6s6Y DvLn1bwGj478Ixk8ZZwczB6H6IEDxS/SBA/Cql8WC9pk5cuRIuioxlYSS EF76UsgZMWkNNr9UnxWzhvIyQLiKsnAuG7U5hb41gItqrJ2HCpVL7xwAQ YsovBFrlLIcH8r18SMKEGZoZG9pJJ5JGc+KI7KSHmvIVs5XS4aFbXHW2N t29lI63w2mH+x1OVt2r+ow4mTDO8CxQ51GsVMscYCVhq7620xrpLTZCW+ Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10239"; a="230394065" X-IronPort-AV: E=Sophos;i="5.88,320,1635231600"; d="scan'208";a="230394065" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2022 03:08:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,320,1635231600"; d="scan'208";a="597789226" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga004.fm.intel.com with ESMTP; 27 Jan 2022 03:08:03 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 27 Jan 2022 03:08:02 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Thu, 27 Jan 2022 03:08:02 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.175) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Thu, 27 Jan 2022 03:08:02 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jahz4wQtMwk22JG7XkyVJSCvDAv3F80uWf3g0Ti27OZ7d+zqfNL0msyPlFVWHzpqeDNKKSwPkabE+inyKOfxMg259F6JtQQFZjybPfIQG+a7cJw/efDMLC7SLFJ8abLqy3l1JxzoN9AP/kdCbG3UCxBb3vTIzZWB4ab/hXEtRP6boqYMsZnljIEI0Zuo6Qcsk3dPMzjwAvzltCDWbZmVbjYFKPkk+T11M1I+s5qQ0n/+8oEjD50RHUVP/ME4758wKfvKbnMNgORbcaqOi9ru5Pq/qgiXGCOQBC0dzqpDkW7m7L+nBcDFVZoQSK4q38zLY3MPDD09nd/KrvCiPgfArQ== 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=bPq0e0XzRdqoepx4OqVPa4rYHz4EGY+8xZm8yAEzgzg=; b=Dk4e1ug9ExUCj/IeUnRLI4u9h47h7RALPnbQuFJnHzJZoZXzq8dDQjCw9Cvwq+x3UYILA9lrdiGs1/4I4xLrlU6gkNLkELCgo2kaC/HwaEu+CaA2CL26IDyQseeS7Q4t7rduoXPpmO1j/XBzp4Mvu7eE7/fbMFHdlB7Xq4Q/e0I8Py2kIgCik8G27jU8cKxBMxa4QcPTDcwYnclXaEx7CIL/bBLeKff1QokD9Hc2vWD4vd3VF/GBvHLd50XQhbRviJSIFJWJXDjbmZ4mKgsHqwebBefivnHyhPoUGpoq7fn0dfonnWlnipf9gjrx0OR4D4eGMDDTqZJWy9XGAtmRSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from MW5PR11MB5809.namprd11.prod.outlook.com (2603:10b6:303:197::6) by MW3PR11MB4649.namprd11.prod.outlook.com (2603:10b6:303:5b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.15; Thu, 27 Jan 2022 11:08:01 +0000 Received: from MW5PR11MB5809.namprd11.prod.outlook.com ([fe80::6044:ba49:2592:68c5]) by MW5PR11MB5809.namprd11.prod.outlook.com ([fe80::6044:ba49:2592:68c5%2]) with mapi id 15.20.4909.017; Thu, 27 Jan 2022 11:08:01 +0000 From: "Zhang, Roy Fan" To: Stephen Hemminger , "dev@dpdk.org" CC: "De Lara Guarch, Pablo" Subject: RE: [PATCH v2 32/83] crypto/ipsec_mb: remove unnecessary NULL checks Thread-Topic: [PATCH v2 32/83] crypto/ipsec_mb: remove unnecessary NULL checks Thread-Index: AQHYEUqLWGaz+AFwQ0OcksxWvXJm8ax2uaWA Date: Thu, 27 Jan 2022 11:08:01 +0000 Message-ID: References: <20220124000518.319850-1-stephen@networkplumber.org> <20220124174719.14417-1-stephen@networkplumber.org> <20220124174719.14417-33-stephen@networkplumber.org> In-Reply-To: <20220124174719.14417-33-stephen@networkplumber.org> Accept-Language: zh-Hans-HK, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.200.16 dlp-reaction: no-action dlp-product: dlpe-windows 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: 6ed3d748-e536-441c-de9f-08d9e18548ac x-ms-traffictypediagnostic: MW3PR11MB4649:EE_ 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: 4HGDgMmP+UfQ74zVCwQ5f96WZre0e8694KlPpybUVWczo+kTaQOEMsJLzw8tvr2rmrf3SjWsoXgoUCpnXKXlLFYG7CP77Hl2cjfO7jDhpZs9fP+66QblJun4pYKuHuItL+zTg/Qe7zqT/GDK4HfMokkcdaQ71tdkoA9VSpWhwrY40OM3ocZ/M2MuHaAxtmDy9ydAUOEPzbRgMyAsQSW85LNekfBw6H+CNGQEvurFrQAYheaXxPqgfUNyukJWh9mi/ZOJOwtymFI5/SNIVomtYPPfIQ5QOWp4X94BufE+Z/I1HJpz+YCcnG2JomqCRUAkSbZXZ2o1kGXyolWH7CCk1zg1rO1NSXyGz05jnAuXrJDmXCDg+hrNkOd9kAHjxCRb/zZALDyVdl/fxEBoUahCIoq9G9qwo4Gae3XWRqWy2UHN9vZhyLXdb64SO+NFcf723WBSVtkJBwAF9/nlnRNq4zgaGXuPmaw/xW7WO8IEK0ya0miC7Vt5ilfc6lG6KpcTAwDi6sSMf7BWqLT7H4bTHbHHxtC1I6wPJZbdYHBAoy9ZDgdttU+Xptnjw5pneT0HhQfeKtTbeZUDDuM1tTg5Sbvh4SnpKr3bswD+D7d7AeTOjGga2OZ3aO+wUCkexTT5mpAB3Q2diyLQjMT1qoq4eHea90DDbNmKGSFbSUV6B7vBmixB7zul18im5Sqfk2yC5Kjo+L+YDWRKAT+Lli/WYw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW5PR11MB5809.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(52536014)(8676002)(8936002)(110136005)(66946007)(5660300002)(66446008)(66476007)(66556008)(76116006)(64756008)(38100700002)(82960400001)(122000001)(4326008)(316002)(55016003)(107886003)(38070700005)(508600001)(26005)(186003)(86362001)(2906002)(6506007)(7696005)(53546011)(71200400001)(9686003)(83380400001)(33656002)(20210929001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?WOaGdX4FWOWT0QUzdBzT7sdTw6HJxvnVINMnmz/+J7Z3mrV6ttot+97z?= =?Windows-1252?Q?bhOoMIjoZO64EwGDs1i4GHPRU5iI4NkysWCiK6QyNKrMZpceZNvVybCZ?= =?Windows-1252?Q?XjfVm4IWdHAsxMgHXvWpOeUbbaRHZlZoZd+ztRimcvwEGFqcrIfY4jMg?= =?Windows-1252?Q?vhy/9PZajbs08L9BqD1dKt0WQcN0umUd2rrCRIlfhUeRvcdpm+0BIpWJ?= =?Windows-1252?Q?ou8KzfW0yjTz4T0bAqmXqbwBV7iRsv10/xdaLtAfpAy6xgrWajp5rhUO?= =?Windows-1252?Q?05ZYikvZzRpEJTxH066YYIneRi5PPvcxi396qrQB5kjU8mFrYLX3S2Uk?= =?Windows-1252?Q?Yhsoz5OFgbVHkrehW3ScYgtxxSKhkfIx4Qw3cSctVJ2/3ZiAHHnMomFo?= =?Windows-1252?Q?uoQZaS2XERsvjMn2F7BLcS1lfr6wnrwDU93eb7VNjzvn+mzPGokOfyGz?= =?Windows-1252?Q?RgB9f0l8QHy8MOGGiLrtwzws6JfS5kd7TkNdwwfzfGUIdWwM8X/doMrk?= =?Windows-1252?Q?5uO5VL5Mn4K78ZKT7lzSoEZF/Os869BAlnApw2Myr1z2HEvP3JToQJqx?= =?Windows-1252?Q?OHGAKQ1iluMAcTDfwBaYnZnX1A2dJq3sWUwjNbymvNLTQGxHgWwpLs4k?= =?Windows-1252?Q?RwXtzy4UvDaPmHmBHX3j//+xpn53x1NkpqIPANAM65gvQT5yHLeG0yr9?= =?Windows-1252?Q?31sxFPt9vYEi6F2byZl4EbPFILGhFiHsjJNrrnqv3xnSn8RlIMwM+4CN?= =?Windows-1252?Q?g5wofTQKWBiWdmGyCFXuYTBE47Jkev/g+ofQ8M7HdNaGAnUYuRBVsgxo?= =?Windows-1252?Q?a9nUxCFgeybJifBy8llmjoOigYLoS+lhfLPt6ABrTJEyhHKFxOC/97rc?= =?Windows-1252?Q?6jOPqGyhHonmse/jPkgF6TF4vr1QB45W9rjnsG841X6mHihJtcUMWamI?= =?Windows-1252?Q?y6rAo2vM/FskmluEnExWSNUsi4UPznCePidCc64IO7E3FVXIVqdd9bp5?= =?Windows-1252?Q?ImXzYaGmoQs8/MeM0UrCk+BzcrQnNyHUetDLRqmtwCYw0S/N12fPszVt?= =?Windows-1252?Q?hCDvo9pVTkziz+9bTwnL6ShEa0jRKO8zrKf6EoiLHlvSnFE3blmXHdDU?= =?Windows-1252?Q?FC2gYrHUZ495jcV4tYRowip3r5pImbyVOx8YMqSxgi1YbWOJ9pMYsT//?= =?Windows-1252?Q?EpwoUh2nGmH2K3qPwoptYi4kDXYRrpKTwei9G/wQvPp65RWkM6hBFDXI?= =?Windows-1252?Q?X9f+hTVF2Sbeb7GlLnZgCpjwGGlu2FnAoCd3QNsVIY1xrv2hdXkF9qVP?= =?Windows-1252?Q?/PsVVL4TDels1CO+RpASgi1tc4zYDKoGD5yALIV5fZS8R+qjyUnxjWNo?= =?Windows-1252?Q?baxPSk0e4pwuEEV7ESHXnsQOJCJJOPmV3/6VFT9BgWF/LArcYzrfsuoR?= =?Windows-1252?Q?ogfdbv2R7loblzeTWprPhmYYd//eXEHK+inhVFu9CTSGp8VWqtZy5Rai?= =?Windows-1252?Q?XAROpHwDWbBfDb8o6iiPgp3x4HLloT2V1xm6El1MgTAT/IQga4GAa+yQ?= =?Windows-1252?Q?m0JTfNkOlvC6BnR5IFwx6bfAfzC5bff299Hmoa5QZt6uMTq9emA4uitq?= =?Windows-1252?Q?nPDZkKdX8BoOjVe2wCUnf+2/2PhkCHhz3kCSB02ld8yhXwu1+F3MRjg2?= =?Windows-1252?Q?pgLFKncuFcah5Qol8U+QdObwrhM2jnNjgTuS/zlbqfQOwEjT2sDESw?= =?Windows-1252?Q?=3D=3D?= Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW5PR11MB5809.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6ed3d748-e536-441c-de9f-08d9e18548ac X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jan 2022 11:08:01.4887 (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: dA0mYom27KOjqKupkQiglZ8DxeaBL84m5CHOxqgIkc3b7+lr0vdfqxfdOg21GoZljVOl2vrU/1f/rThBdhkbfw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4649 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 5:46 PM > To: dev@dpdk.org > Cc: Stephen Hemminger ; Zhang, Roy Fan > ; De Lara Guarch, Pablo > > Subject: [PATCH v2 32/83] crypto/ipsec_mb: remove unnecessary NULL > checks >=20 > Remove redundant NULL pointer checks before free functions > found by nullfree.cocci >=20 > Signed-off-by: Stephen Hemminger > --- > drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c > b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c > index 189262c4ad52..f808da9edf89 100644 > --- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c > +++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c > @@ -102,8 +102,7 @@ ipsec_mb_qp_release(struct rte_cryptodev *dev, > uint16_t qp_id) >=20 > if (qp !=3D NULL && rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY) { > r =3D rte_ring_lookup(qp->name); > - if (r) > - rte_ring_free(r); > + rte_ring_free(r); >=20 > #if IMB_VERSION(1, 1, 0) > IMB_VERSION_NUM > if (qp->mb_mgr) > @@ -291,8 +290,7 @@ ipsec_mb_qp_setup(struct rte_cryptodev *dev, > uint16_t qp_id, > if (qp->mb_mgr_mz) > rte_memzone_free(qp->mb_mgr_mz); > #endif > - if (qp) > - rte_free(qp); > + rte_free(qp); > return ret; > } >=20 > -- > 2.30.2 Acked-by: Fan Zhang