From: Stephen Hemminger <stephen@networkplumber.org>
To: Ariel Otilibili <otilibil@eurecom.fr>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
David Marchand <david.marchand@redhat.com>,
Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Subject: Re: [PATCH 1/1] app/test: remove useless calls to rte_bitmap_free
Date: Fri, 13 Dec 2024 08:59:28 -0800 [thread overview]
Message-ID: <20241213085928.0f2f2de1@hermes.local> (raw)
In-Reply-To: <20241213113059.59320-2-otilibil@eurecom.fr>
On Fri, 13 Dec 2024 12:30:00 +0100
Ariel Otilibili <otilibil@eurecom.fr> wrote:
> * rte_bitmap_free is only useful for its return value
> * and its return value is not used.
>
> ```
> $ < lib/eal/include/rte_bitmap.h sed -ne '/bitmap_free/,/^}/p'
>
> rte_bitmap_free(struct rte_bitmap *bmp)
> {
> /* Check input arguments */
> if (bmp == NULL) {
> return -1;
> }
>
> return 0;
> }
> ```
>
> Reported-by: Coverity, IDs 357712 & 357737
> Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
> ---
> app/test/test_bitmap.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/app/test/test_bitmap.c b/app/test/test_bitmap.c
> index bab11812c7..a21210a215 100644
> --- a/app/test/test_bitmap.c
> +++ b/app/test/test_bitmap.c
> @@ -208,7 +208,6 @@ test_bitmap_all_clear(void)
> if (test_bitmap_scan_operations(bmp) < 0)
> return TEST_FAILED;
>
> - rte_bitmap_free(bmp);
> rte_free(mem);
>
> return TEST_SUCCESS;
> @@ -254,7 +253,6 @@ test_bitmap_all_set(void)
> return TEST_FAILED;
> }
>
> - rte_bitmap_free(bmp);
> rte_free(mem);
>
> return TEST_SUCCESS;
I would rather that, rte_bitmap_free() be made a real function
which would shutup Coverity.
And rte_bitmap_free() should just be a void function, like all the
other XXX_free() variants in DPDK.
next prev parent reply other threads:[~2024-12-13 16:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-13 11:29 [PATCH 0/1] " Ariel Otilibili
2024-12-13 11:30 ` [PATCH 1/1] " Ariel Otilibili
2024-12-13 16:59 ` Stephen Hemminger [this message]
2024-12-13 21:38 ` Ariel Otilibili-Anieli
2024-12-13 11:38 ` [v2 0/1] " Ariel Otilibili
2024-12-13 11:38 ` [v2 1/1] " Ariel Otilibili
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=20241213085928.0f2f2de1@hermes.local \
--to=stephen@networkplumber.org \
--cc=cristian.dumitrescu@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=otilibil@eurecom.fr \
--cc=thomas@monjalon.net \
/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).