From: "Dybkowski, AdamX" <adamx.dybkowski@intel.com>
To: "Trahe, Fiona" <fiona.trahe@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"akhil.goyal@nxp.com" <akhil.goyal@nxp.com>
Subject: Re: [dpdk-dev] [PATCH] test/compress: fix coverity warnings
Date: Thu, 25 Jul 2019 14:22:44 +0000 [thread overview]
Message-ID: <522B1A062D56224ABC0C6BDBCD64D9D32F3E8561@irsmsx105.ger.corp.intel.com> (raw)
In-Reply-To: <348A99DA5F5B7549AA880327E580B435897D06F4@IRSMSX101.ger.corp.intel.com>
Hi Fiona.
> -----Original Message-----
> From: Trahe, Fiona
> Sent: Thursday, 25 July, 2019 15:56
> To: Dybkowski, AdamX <adamx.dybkowski@intel.com>; dev@dpdk.org;
> akhil.goyal@nxp.com
> Cc: Trahe, Fiona <fiona.trahe@intel.com>
> 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 <fiona.trahe@intel.com>;
> > akhil.goyal@nxp.com
> > Cc: Dybkowski, AdamX <adamx.dybkowski@intel.com>
> > 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 <adamx.dybkowski@intel.com>
> > ---
> > 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 = NULL;
> > uint64_t compress_checksum[num_bufs];
> >
> > + if (capa == 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 suite, not a PMD.
next prev parent reply other threads:[~2019-07-25 14:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-23 10:53 Adam Dybkowski
2019-07-25 13:56 ` Trahe, Fiona
2019-07-25 14:22 ` Dybkowski, AdamX [this message]
2019-07-26 8:37 ` Trahe, Fiona
2019-07-26 12:43 ` Akhil Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=522B1A062D56224ABC0C6BDBCD64D9D32F3E8561@irsmsx105.ger.corp.intel.com \
--to=adamx.dybkowski@intel.com \
--cc=akhil.goyal@nxp.com \
--cc=dev@dpdk.org \
--cc=fiona.trahe@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).