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 048EBA00C2; Thu, 10 Feb 2022 04:03:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E11FD40140; Thu, 10 Feb 2022 04:03:52 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id CDFE740041 for ; Thu, 10 Feb 2022 04:03:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644462232; x=1675998232; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=DXq2/2uq1jQ7DSmwEREwjcythp0BQyLnv52REX8Xdgc=; b=C8okPC6aAV4tDDm5v2PGpQqzKWadp7htc2tdCsBJLkAFWDv1SPzkxyrV EC2a8MPQg6fQ+srNFU9qiI/4j3B7jlOyS+zkUcaY6n7f7T983GccL8KH/ U3JVVEx8+jfbs5pjllX0JiZJrm7F8tIO7LpM3ltokdB4y5z9Y84EsemMk 3rYSM4k0a0omlP1SBJKGg7uDOB99sH36CbVngB0CNyC2RxF4X1b7VKfTY mX+7oQv1uZpYGPfWZoGjDTV+lcxgH2O0KGB9fVpM7sct6KIxqM0Y+iz16 n7UqDNAekMUuegit1B9C55fi2wF26GFkZ4odbCD/O6/+NhHB9767/S2FL g==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="273946263" X-IronPort-AV: E=Sophos;i="5.88,357,1635231600"; d="scan'208";a="273946263" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 19:03:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,357,1635231600"; d="scan'208";a="773730681" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga005.fm.intel.com with ESMTP; 09 Feb 2022 19:03:50 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 9 Feb 2022 19:03:50 -0800 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 9 Feb 2022 19:03:49 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 9 Feb 2022 19:03:49 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 9 Feb 2022 19:03:36 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BOP0V0jTABpP64aL9juDd+Romf46wBzKHYgRPcg0/zsyFkvLFg87wHpMnqP4BmpQ0/wlDa39sp4V8ys1H4Ti3+Hd4YLQ+cutSMi3I8uVTCcsoTiaXJaPZF/qiy16aJOhK7cm2m/J1VPCSn3e5QoH16blgT0CMwy5TGcbmK7LcWFHTRYROm1QmQskEkUezpw1AxaeyLff++Hw/tGH6LEkgG0KWP4e343ZR/Sf3xrfiLNAI6pzMnSPZkpFrijhuNfuVgg2gYza6X+q6Syr2WdlqlOZoEWtcmw5Cw7A4bDSzAst211Xn+gAi4Ors53SjXaNw6oPuFfk9TTRpYTQV0dC8g== 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=0Smcdn4QlCLfOn4dk3iSrnnXmoZW4A+2JwEq62J8tGA=; b=cyyQedKSKlj0+JRwrgejbdI2YjXa/LLnXrut6RzDOFgP4PcR/aJv67kmwfq+68fa+FngoHjRJviZExHpAxV1/2IY1ladb4fF4JeCZ12LunxLaN9DFN4fKfr4N+anqZCm4DB53zlObnawTbsB+zd8Uq1pYGU7CX5xbwZQ5RNG9/MmWrjcuUzPXGo/AytQJdKwVCIxLrXGtSA/Sa0bUQxJ2YTYpVt+BNe36m0YUOcxnwXNv1xkXAYH13C/1J2PcKzvnLa7kMOt9DjODXhR7BuGKnCRRXfs57ULYmv3ImpKcGi5QaBbyN4B516Q7Ow34vyandmitUlrtlnleKy9IEEWgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DM6PR11MB4252.namprd11.prod.outlook.com (2603:10b6:5:201::26) by DM8PR11MB5733.namprd11.prod.outlook.com (2603:10b6:8:30::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Thu, 10 Feb 2022 03:03:35 +0000 Received: from DM6PR11MB4252.namprd11.prod.outlook.com ([fe80::d0ba:999b:3297:c220]) by DM6PR11MB4252.namprd11.prod.outlook.com ([fe80::d0ba:999b:3297:c220%4]) with mapi id 15.20.4951.019; Thu, 10 Feb 2022 03:03:35 +0000 From: "Xu, Rosen" To: Stephen Hemminger , "dev@dpdk.org" CC: Hemant Agrawal , Jakub Palider , Tomasz Duszynski , "Nipun Gupta" , "Zhang, Tianfei" Subject: RE: [PATCH v3 32/36] raw/*: remove unnecessary NULL checks Thread-Topic: [PATCH v3 32/36] raw/*: remove unnecessary NULL checks Thread-Index: AQHYHenc/6UW7KwAfU28YnX3GC68Y6yMGYaQ Date: Thu, 10 Feb 2022 03:03:35 +0000 Message-ID: References: <20220124000518.319850-1-stephen@networkplumber.org> <20220209191748.377729-1-stephen@networkplumber.org> <20220209191748.377729-33-stephen@networkplumber.org> In-Reply-To: <20220209191748.377729-33-stephen@networkplumber.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.200.16 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWRhYmVkNTQtZGE5Mi00NWZiLThkMDctNWQ3ZTk0YjkyOGE4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicjRpTW5DK0xjcWJMU3lJbDNPYjZnSVB2SnVSZUEzRzNlc0s3U2N4R1VNVVFqSXJUUWdhMEh0OVV2UHNtTjNmcCJ9 x-ctpclassification: CTP_NT 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: 88c5a4ec-3e48-4c73-124b-08d9ec41edfc x-ms-traffictypediagnostic: DM8PR11MB5733:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:510; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: DnX4fhvJYHoSw+YTJwImHEjLpW8jyeceI+Y3Dz+JUAWF8uB1n2o/Y1O5Ht1IPB/Qiqgs3YzojLRBj5rjuQY5pZXH7dGvqxWtPjoVBD+Z8TBQG1iD2AGIUfFb4CwX5bjhPKMeOd1h60+50BSvg/85sWBxqqmOpaAO9oFirVe8iGvq+i/R9Yk7JhYavnqO/TKwxqjjyFK30fX0GQtBihvHwnXjx5va/1UPmoYPOawqG27m4L8sE9eInx96L/4yuieapgrBOuOl+SERp6GwrA6mYzsKYagDZqTbvt4K8h8hmkb/eS7nKJnX6+blUw3KhItDWI51dRmGQ/JNSjDW+raJSWx9GQgMa+dZ2hNpRX/1DmBheXNJ9Qn8RijGJxYhnPKV8/ZejuzpNj01J9bMY457gOkisAQBnDfFvAV+iXAkkvHU3igcBS6OUZjsco3Nf0WtTfKlKFOgl9EG/QOfkRDO9GGVz0bCtaarbPYQB9TTF3ZcbkvrJHOzFZrMWZ+LGBquBzeKqXoJcGMKgBkWQcEoI/TfCYhxFSP7uf5jogoESuZdM3fhVuAhXKid28THe+lP98x1+j6eB5FGlPnM8V0mPHYKy7pWyrw+FnM5qo1yCkq1cmJcglaaBuA8MfSvSdOfYttsH92yMwrVmarNhDZYzZhQysCOKXODupdnMxI/ddY8AOjF7mAGYkWMh66Aba2ibTSWejyp9+v9il1H0kbzOw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4252.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(8936002)(55016003)(508600001)(86362001)(64756008)(7696005)(9686003)(6506007)(8676002)(66556008)(66476007)(52536014)(83380400001)(66446008)(4326008)(53546011)(26005)(316002)(33656002)(38070700005)(71200400001)(122000001)(186003)(76116006)(110136005)(82960400001)(5660300002)(66946007)(54906003)(107886003)(38100700002)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?XsUSmIskTJdTLXzqHpf6ts797M/FxdfDiuRMdeD2C21Fp2+yayQvmgZpuC2x?= =?us-ascii?Q?JfCkrkxOuD5hdzsgQJtc3PuAXOnlgrdXS2qEUtsDumaHWmAzW20HGZkCihg7?= =?us-ascii?Q?Sa7YpYdf1OOGn9iH7FZdGjlZuc3WzxB3oqHVDLwLE55BIwHwVOKwIIIEaIdW?= =?us-ascii?Q?f9/wQC/NL0XdC2HppgKif/kmTQkEza1z3KPUQI+z29TJxx+7flfRD4wrGTag?= =?us-ascii?Q?2/Aht5wofJz6o0XJcW/oza83KCm24OS+d7VQC04M9TrD5dsI5PfgqQmW/Yxl?= =?us-ascii?Q?msZCxEB9ydBAke9raVp0MhoKiuDgWj7rI1KCIekclQeamcBnfAlkXDCCZ5cY?= =?us-ascii?Q?n/EVH/DgahZ9FaSMZOWSLI948ZvxMnZboBMjGB4O0Yf4S3IFkTQLddeTu+ss?= =?us-ascii?Q?2l2Zl1xhdRhrJtLoglFq3B42J3I4b6HWtWhRkv07fP0fkxZ+vnRZEy56FuVD?= =?us-ascii?Q?vRjyEhvUnZZJOg1wDZ8Vzri8n5gbunRETo98dBulmY35CTAc7ck4LU0U/jFQ?= =?us-ascii?Q?XFYeMGP0Nca6QA5OauvGYjnZa90sOBwA+mMrJexvC5WuLU6mwfcknWnlsknZ?= =?us-ascii?Q?cw5AOqsoBiJSL5V5keITdspAf6K/QBXfy0Uva33Nyf7Ph7uiV02CvuWD+gvX?= =?us-ascii?Q?fN1OA67Zlu1p8aYsfct2Efu/BvBY0t1xXbbjqjbB96xbdIiHe+ZMrAApYg+H?= =?us-ascii?Q?zskTMwCJPjYWsDOAClzCD7ORBx68Fo9p/6dWjICLS+OODqJMU4iIUAVVMjtu?= =?us-ascii?Q?zCobzUd6ErX6bf7a/wymQRNx7ENsaCT297dIhDCL5LMPUCn/rws9XKmq86wd?= =?us-ascii?Q?Rar7BhfFGN0l5aFvW+ODhvBi1y19QGJ+bEVzmp2WatWakrqKEfe+pXdXYt1c?= =?us-ascii?Q?tRgdmsjUHFEUrdEJtAcrHdr+W9rq0S6GNrDVJw4+UHP8UxxMjrMm7TEdT+Fa?= =?us-ascii?Q?zzW71pXzlQ91ldy5rAQ6T6f8iEPBvtWg/rrbpfCJGFndghayeMfapZyTF9KB?= =?us-ascii?Q?smHMYZz3VdoYYlF66pY59gW93Ixo6nqHmk/AElXNH3ES9RNGBZSCgP3l87NE?= =?us-ascii?Q?UZtB/yIE0zEfRIhySu+uBPoirxDoaC3RmMIltFTphvygnmjWpd71o84isbO4?= =?us-ascii?Q?0f1Nly0Cu/F0C22zc4PHqRbdyvOx+m5vVOrw6es5Y7BjI9FtqlWhz0gEE60a?= =?us-ascii?Q?61OGyVM8ErKUkIBkEAlm4pRXEhrKlQ+xFTGQS9OGMU5/PrTSMyBPK8uQesaO?= =?us-ascii?Q?fLkWcSj/tktSBtxs+kPdHSFSndT9gJDWY+4Vz29WLjJp8kjEzLRhxE80CWuV?= =?us-ascii?Q?SWRNcfq5z0Cs1AICoch1duaHBbgAR+t7BPj/33LmtY53GJoP+WgKZj6IgLiS?= =?us-ascii?Q?/XNeWA0zbmsuGMJ8Qe9rR2HT3sdOXXejkKwXKE1sm1pepfbU2L/NayttuR/h?= =?us-ascii?Q?R+FCnCPQj2FYUTO6BniRe3Q/deoO7FyxdqV32y/8aVsaIdg059522utf5rIS?= =?us-ascii?Q?5d99ls0OWCMmQkg+wVlwO5JdyjmyB3QEwJEESMycGtjk3WnK/k8P4bSbf8Ko?= =?us-ascii?Q?0QvTUq6yujP6DpP7gWKZtElziEo1cbD+/X5YNfWtGPnpHtRRrTumiqJwI1gf?= =?us-ascii?Q?6VhKFSKYmVWX3tHdagY1tlI=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4252.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88c5a4ec-3e48-4c73-124b-08d9ec41edfc X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Feb 2022 03:03:35.8603 (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: L4I0iZAhN9NJ8tePiCfajO0eOWkZ91940ViiR6orJD5Mi/aid4ZHdTAPDjePT0rp/KATYJzlrAoyvgg0Kvqxaw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR11MB5733 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 Hi, > -----Original Message----- > From: Stephen Hemminger > Sent: Thursday, February 10, 2022 3:18 > To: dev@dpdk.org > Cc: Stephen Hemminger ; Hemant Agrawal > ; Jakub Palider ; > Tomasz Duszynski ; Nipun Gupta > ; Xu, Rosen ; Zhang, Tianfei > > Subject: [PATCH v3 32/36] raw/*: 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: Hemant Agrawal > --- > drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c | 3 +-- > drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 15 +++++---------- > drivers/raw/ifpga/ifpga_rawdev.c | 9 +++------ > drivers/raw/skeleton/skeleton_rawdev_test.c | 6 ++---- > 4 files changed, 11 insertions(+), 22 deletions(-) >=20 > diff --git a/drivers/raw/ifpga/ifpga_rawdev.c > b/drivers/raw/ifpga/ifpga_rawdev.c > index fdf3c23d2c5f..b73512d3ada5 100644 > --- a/drivers/raw/ifpga/ifpga_rawdev.c > +++ b/drivers/raw/ifpga/ifpga_rawdev.c > @@ -836,8 +836,7 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int > port_id, > } >=20 > free_buffer: > - if (buf_to_free) > - rte_free(buf_to_free); > + rte_free(buf_to_free); > close_fd: > close(file_fd); > file_fd =3D 0; > @@ -1739,10 +1738,8 @@ ifpga_cfg_probe(struct rte_vdev_device *dev) > ret =3D rte_eal_hotplug_add(RTE_STR(IFPGA_BUS_NAME), > dev_name, devargs->args); > end: > - if (kvlist) > - rte_kvargs_free(kvlist); > - if (name) > - free(name); > + rte_kvargs_free(kvlist); > + free(name); >=20 > return ret; > } Reviewed-by Rosen Xu