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 5DD36A046B for ; Fri, 26 Jul 2019 10:37:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1B9441C3DE; Fri, 26 Jul 2019 10:37:58 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D89E91C3BF for ; Fri, 26 Jul 2019 10:37:55 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2019 01:37:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,310,1559545200"; d="scan'208";a="172972338" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by orsmga003.jf.intel.com with ESMTP; 26 Jul 2019 01:37:54 -0700 Received: from irsmsx112.ger.corp.intel.com (10.108.20.5) by IRSMSX107.ger.corp.intel.com (163.33.3.99) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 26 Jul 2019 09:37:53 +0100 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.88]) by irsmsx112.ger.corp.intel.com ([169.254.1.38]) with mapi id 14.03.0439.000; Fri, 26 Jul 2019 09:37:53 +0100 From: "Trahe, Fiona" To: "Dybkowski, AdamX" , "dev@dpdk.org" , "akhil.goyal@nxp.com" Thread-Topic: [PATCH] test/compress: fix coverity warnings Thread-Index: AQHVQUYSsbNOprnXOEy34/CkPKREeqbbXnCg///3GQCAAUJRAA== Date: Fri, 26 Jul 2019 08:37:52 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B435897D14E9@IRSMSX101.ger.corp.intel.com> References: <20190723105349.23622-1-adamx.dybkowski@intel.com> <348A99DA5F5B7549AA880327E580B435897D06F4@IRSMSX101.ger.corp.intel.com> <522B1A062D56224ABC0C6BDBCD64D9D32F3E8561@irsmsx105.ger.corp.intel.com> In-Reply-To: <522B1A062D56224ABC0C6BDBCD64D9D32F3E8561@irsmsx105.ger.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWM3Y2QzZmQtNzNlNy00NTQyLWE2ZjEtZTA0Y2YzMzU0ZDYxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVmRzbGRhUUJ1Q2pkZWdcL0VGTFdwVERPN3Y5YkJpXC9FZHBaWEFmRFhcL01LRk4xaFwvQ0kxQUJScDc5TGxaYTZoczUifQ== x-ctpclassification: CTP_NT 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 Adam, > -----Original Message----- > From: Dybkowski, AdamX > Sent: Thursday, July 25, 2019 3:23 PM > To: Trahe, Fiona ; dev@dpdk.org; akhil.goyal@nxp.c= om > Subject: RE: [PATCH] test/compress: fix coverity warnings >=20 > Hi Fiona. >=20 > > -----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 > > > > Hi Adam, > > > > > -----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 variabl= e which is initialized to -1). > That's why I handle the error case the same way. This is inside the test = suite, not a PMD. [Fiona] ok, can see in the code that the capability is already checked at t= he higher level for this case, so no need to return ENOTSUP here. -1 is ok Acked-by: Fiona Trahe