From: Akhil Goyal <akhil.goyal@nxp.com>
To: "Trahe, Fiona" <fiona.trahe@intel.com>,
"Dybkowski, AdamX" <adamx.dybkowski@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] test/compress: fix coverity warnings
Date: Fri, 26 Jul 2019 12:43:03 +0000 [thread overview]
Message-ID: <VE1PR04MB66395781908723A4C50E93EEE6C00@VE1PR04MB6639.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <348A99DA5F5B7549AA880327E580B435897D14E9@IRSMSX101.ger.corp.intel.com>
> > > >
> > > > 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.
> [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 <fiona.trahe@intel.com>
Applied to dpdk-next-crypto
Thanks.
prev parent reply other threads:[~2019-07-26 12:43 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
2019-07-26 8:37 ` Trahe, Fiona
2019-07-26 12:43 ` Akhil Goyal [this message]
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=VE1PR04MB66395781908723A4C50E93EEE6C00@VE1PR04MB6639.eurprd04.prod.outlook.com \
--to=akhil.goyal@nxp.com \
--cc=adamx.dybkowski@intel.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).