From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Morten Brørup" <mb@smartsharesystems.com>,
	"Cristian Dumitrescu" <cristian.dumitrescu@intel.com>,
	"Tyler Retzlaff" <roretzla@linux.microsoft.com>
Subject: RE: [PATCH v2] bitmap: change return value of rte_bitmap_free
Date: Thu, 30 Oct 2025 07:57:48 +0000	[thread overview]
Message-ID: <cc6a7dece31f4769b6ad0c1038d35434@huawei.com> (raw)
In-Reply-To: <20251029145055.990899-1-stephen@networkplumber.org>
> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Wednesday, October 29, 2025 2:51 PM
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>; Morten Brørup
> <mb@smartsharesystems.com>; Cristian Dumitrescu
> <cristian.dumitrescu@intel.com>; Tyler Retzlaff <roretzla@linux.microsoft.com>
> Subject: [PATCH v2] bitmap: change return value of rte_bitmap_free
> 
> No existing code is checking the return value of rte_bitmap_free
> and other functions like rte_free do not return an int.
> Change it to just a stub void function.
> 
> This was motivated by Coverity warnings about unchecked return
> value.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
> ---
>  doc/guides/rel_notes/release_25_11.rst |  3 +++
>  lib/eal/include/rte_bitmap.h           | 13 ++++---------
>  2 files changed, 7 insertions(+), 9 deletions(-)
> 
> diff --git a/doc/guides/rel_notes/release_25_11.rst
> b/doc/guides/rel_notes/release_25_11.rst
> index c5ba335cfc..4b8e084204 100644
> --- a/doc/guides/rel_notes/release_25_11.rst
> +++ b/doc/guides/rel_notes/release_25_11.rst
> @@ -220,6 +220,9 @@ API Changes
>    The link type was previously hardcoded to the Ethernet link type in the API.
>    This argument is added to ``rte_pcapng_add_interface``.
> 
> +* bitmap: Changed the return type of ``rte_bitmap_free()`` to void
> +  for consistency with other free functions.
> +
> 
>  ABI Changes
>  -----------
> diff --git a/lib/eal/include/rte_bitmap.h b/lib/eal/include/rte_bitmap.h
> index abb102f1d3..ebe6c44998 100644
> --- a/lib/eal/include/rte_bitmap.h
> +++ b/lib/eal/include/rte_bitmap.h
> @@ -282,20 +282,15 @@ rte_bitmap_init_with_all_set(uint32_t n_bits, uint8_t
> *mem, uint32_t mem_size)
>  /**
>   * Bitmap free
>   *
> + * This function does nothing in current implementation.
> + *
>   * @param bmp
>   *   Handle to bitmap instance
> - * @return
> - *   0 upon success, error code otherwise
>   */
> -static inline int
> +static inline void
>  rte_bitmap_free(struct rte_bitmap *bmp)
>  {
> -	/* Check input arguments */
> -	if (bmp == NULL) {
> -		return -1;
> -	}
> -
> -	return 0;
> +	RTE_SET_USED(bmp);
>  }
> 
>  /**
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
> 2.51.0
     prev parent reply	other threads:[~2025-10-30  7:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-28 20:44 [PATCH] " Stephen Hemminger
2025-10-29  0:15 ` Morten Brørup
2025-10-29 14:50 ` [PATCH v2] " Stephen Hemminger
2025-10-30  7:57   ` Konstantin Ananyev [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=cc6a7dece31f4769b6ad0c1038d35434@huawei.com \
    --to=konstantin.ananyev@huawei.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=mb@smartsharesystems.com \
    --cc=roretzla@linux.microsoft.com \
    --cc=stephen@networkplumber.org \
    /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).