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 8B152A046B for ; Thu, 25 Jul 2019 16:22:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 617471C361; Thu, 25 Jul 2019 16:22:48 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 843321C35F for ; Thu, 25 Jul 2019 16:22:47 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2019 07:22:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,307,1559545200"; d="scan'208";a="345454416" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga005.jf.intel.com with ESMTP; 25 Jul 2019 07:22:45 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.164]) by IRSMSX102.ger.corp.intel.com ([169.254.2.59]) with mapi id 14.03.0439.000; Thu, 25 Jul 2019 15:22:44 +0100 From: "Dybkowski, AdamX" To: "Trahe, Fiona" , "dev@dpdk.org" , "akhil.goyal@nxp.com" Thread-Topic: [PATCH] test/compress: fix coverity warnings Thread-Index: AQHVQUYSkjPm3hWZ30m9c2HJgdDNDKbbTikAgAAXegA= Date: Thu, 25 Jul 2019 14:22:44 +0000 Message-ID: <522B1A062D56224ABC0C6BDBCD64D9D32F3E8561@irsmsx105.ger.corp.intel.com> References: <20190723105349.23622-1-adamx.dybkowski@intel.com> <348A99DA5F5B7549AA880327E580B435897D06F4@IRSMSX101.ger.corp.intel.com> In-Reply-To: <348A99DA5F5B7549AA880327E580B435897D06F4@IRSMSX101.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWM3Y2QzZmQtNzNlNy00NTQyLWE2ZjEtZTA0Y2YzMzU0ZDYxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVmRzbGRhUUJ1Q2pkZWdcL0VGTFdwVERPN3Y5YkJpXC9FZHBaWEFmRFhcL01LRk4xaFwvQ0kxQUJScDc5TGxaYTZoczUifQ== dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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" Hi Fiona. > -----Original Message----- > From: Trahe, Fiona > Sent: Thursday, 25 July, 2019 15:56 > To: Dybkowski, AdamX ; dev@dpdk.org; > akhil.goyal@nxp.com > Cc: Trahe, Fiona > Subject: RE: [PATCH] test/compress: fix coverity warnings >=20 > Hi Adam, >=20 > > -----Original Message----- > > From: Dybkowski, AdamX > > Sent: Tuesday, July 23, 2019 11:54 AM > > To: dev@dpdk.org; Trahe, Fiona ; > > akhil.goyal@nxp.com > > Cc: Dybkowski, AdamX > > Subject: [PATCH] test/compress: fix coverity warnings > > > > 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_compressdev.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 variable = which is initialized to -1). That's why I handle the error case the same way. This is inside the test su= ite, not a PMD.