From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 81314A046B for ; Fri, 26 Jul 2019 14:43:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4EFD81C444; Fri, 26 Jul 2019 14:43:07 +0200 (CEST) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50067.outbound.protection.outlook.com [40.107.5.67]) by dpdk.org (Postfix) with ESMTP id 5F5B41C441 for ; Fri, 26 Jul 2019 14:43:05 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iafk1EzwywCBTKJVx1dvLBsJJT4f1Yh7NgB+RAlXb28FKKHepguQorOKcenf1xrK7gAIdqQLHPX/Q62Zw5sqFqasOrO0sQePn767moTiay/Wx3JdXvioovYnPuAKbiQ49Ni82FTgRJPBSFuG3opl4bL4eipo+P4wihgShJSgGQ5O1+lhQ+ceeyx0nQYjw27fcKzSkZPzWXn+zU+P0A/7jQww6DPkZo4f72Jcjvz5CEoFGWF2D2t7CJkasw3lgmSUoeWDEr8jyYe0D/C9+w5hL/R2c13sgtYKAG1vbFt5g5ZsKMpi5PdIyll2zZMG7hv+2qCd6lmtgmOPlMKFVAYeMw== 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-SenderADCheck; bh=odJW8Zeg7yilwWMoDSN7lWfEdEiKxWwpBwYhVMhSRfs=; b=Z+iDjBROJYPDw14WIlQ0Sy3A2wOZysyQ3P9aCfXerc0vjDktZKYzJSU4P3QIgG2Omgb1So5XRJ609c4VCQ/lbxwukc+Y3iz+0t1xoD0xXgCiNQyl1+CnMY0DUL2Q5qUSnoWbTputPXdpwQRkFf1iKsh5z9wTCOsjztc7OUQAQafu3IQGvzGQ69gP1R4Vrv2dA4m8fiu6Rw6Y+DDDyT2nWt+Qt3lL9O6xcWy6rDlWQKVxQZwMYQVc8qd6+mTjDBXdw2Pj6rkdTAEvkE7n0kee2huO0snQAQhqoZqs0VjNnPmMS3+A++Nwpe0VackfI7zh5MJp1FYhgU3ptH0350ur1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=nxp.com;dmarc=pass action=none header.from=nxp.com;dkim=pass header.d=nxp.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=odJW8Zeg7yilwWMoDSN7lWfEdEiKxWwpBwYhVMhSRfs=; b=ThuTCasPjtEMANkpBNLjGv53w/3b+CSS8f1pT2Hgh7lZLrIq7L7cLgQzUZ1cWIn/rTaFsCb5uQtG0WGE6UXqa0gzUxTI2UHXo5bvk+7nTs3pyMHx5/bxnFyCohrZmUNWasZ6bycWdn+9ClZVD442/IgFleyV3vKGjeofH9QTGkU= Received: from VE1PR04MB6639.eurprd04.prod.outlook.com (20.179.235.82) by VE1PR04MB6463.eurprd04.prod.outlook.com (20.179.233.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.14; Fri, 26 Jul 2019 12:43:04 +0000 Received: from VE1PR04MB6639.eurprd04.prod.outlook.com ([fe80::964:4ddc:346b:e2ec]) by VE1PR04MB6639.eurprd04.prod.outlook.com ([fe80::964:4ddc:346b:e2ec%7]) with mapi id 15.20.2115.005; Fri, 26 Jul 2019 12:43:04 +0000 From: Akhil Goyal To: "Trahe, Fiona" , "Dybkowski, AdamX" , "dev@dpdk.org" Thread-Topic: [PATCH] test/compress: fix coverity warnings Thread-Index: AQHVQUYMykwWsDXGg0i4ThhJhu/mYKbbXuwAgAAHYQCAATH6AIAARGjw Date: Fri, 26 Jul 2019 12:43:03 +0000 Message-ID: References: <20190723105349.23622-1-adamx.dybkowski@intel.com> <348A99DA5F5B7549AA880327E580B435897D06F4@IRSMSX101.ger.corp.intel.com> <522B1A062D56224ABC0C6BDBCD64D9D32F3E8561@irsmsx105.ger.corp.intel.com> <348A99DA5F5B7549AA880327E580B435897D14E9@IRSMSX101.ger.corp.intel.com> In-Reply-To: <348A99DA5F5B7549AA880327E580B435897D14E9@IRSMSX101.ger.corp.intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; x-originating-ip: [92.120.0.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8065bd4a-aacf-421b-8c91-08d711c6cd4a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VE1PR04MB6463; x-ms-traffictypediagnostic: VE1PR04MB6463: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 01106E96F6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(136003)(376002)(346002)(39860400002)(396003)(189003)(199004)(7696005)(6116002)(6436002)(76176011)(2906002)(33656002)(110136005)(44832011)(86362001)(446003)(71190400001)(71200400001)(486006)(476003)(25786009)(66476007)(6246003)(66066001)(14454004)(53936002)(68736007)(102836004)(256004)(26005)(55016002)(9686003)(6506007)(81156014)(81166006)(8936002)(316002)(2501003)(7736002)(478600001)(8676002)(76116006)(5660300002)(66946007)(186003)(64756008)(229853002)(3846002)(52536014)(66556008)(66446008)(11346002)(99286004)(74316002)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR04MB6463; H:VE1PR04MB6639.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: hOng4uWP35bcMuuIIWXPMZlQxxZrV2BzGiDmweDYbSSmyLeUovUXuLbnIdvGmOE3eA9EpU3qq+99iks/FqwdE2iMcwpcq+lfoPfOi/lxqPjqocJF3tHNKOrbwuBc6Hvcd8N5jB/+Vae7TufNqHDD1lGE/NstCWnc7Z1E0N4sc/2VbBj27EzjdXrk32XPjvtVjoeKpphlyyYqoUYxAwYcknfhUGgSHdFmfU4yykDad802YiEyUbMKY15amzt/SJPc53IZi1hsNgfVHIq+lQ0hOELgZwGShTuNeJhBzVGZ+BEHhiqusCoQsQIU+wuhbjDkyPsSu1IxL9M+e5+yZhBoWdQY4jcAjaHDAXdZ0vFkG9nGCGZH7mVhXhvCjH2WMSkMeWAnRTBiz4eFhfRByLBCAn4o6TBEPt8id6gNeRTir40= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8065bd4a-aacf-421b-8c91-08d711c6cd4a X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jul 2019 12:43:03.9977 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: akhil.goyal@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6463 Subject: Re: [dpdk-dev] [PATCH] test/compress: fix coverity warnings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > > > > > > > > CID 340857: Null pointer dereferences (NULL_RETURNS) > > > > > > > > CID 340856: (CONSTANT_EXPRESSION_RESULT) > > > > > > > > Fixes: 3be12ea52ad8 ("test/compress: improve debug trace setup") > > > > > > > > Signed-off-by: Adam Dybkowski > > > > --- > > > > app/test/test_compressdev.c | 10 ++++++++-- > > > > 1 file changed, 8 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/app/test/test_compressdev.c b/app/test/test_compressde= v.c > > > > index 65889c242..992eac8e0 100644 > > > > --- a/app/test/test_compressdev.c > > > > +++ b/app/test/test_compressdev.c > > > > @@ -755,6 +755,12 @@ test_deflate_comp_decomp(const struct > > > interim_data_params *int_data, > > > > char *contig_buf =3D NULL; > > > > uint64_t compress_checksum[num_bufs]; > > > > > > > > + if (capa =3D=3D NULL) { > > > > + RTE_LOG(ERR, USER1, > > > > + "Compress device does not support DEFLATE\n"); > > > > + return -1; > > > [Fiona] shouldn't you return -ENOTSUP? > > [Adam] All other errors end with returning -1 (see the ret_status varia= ble which > is initialized to -1). > > That's why I handle the error case the same way. This is inside the tes= t suite, > not a PMD. > [Fiona] ok, can see in the code that the capability is already checked at= the > higher level > for this case, so no need to return ENOTSUP here. -1 is ok > Acked-by: Fiona Trahe Applied to dpdk-next-crypto Thanks.