[PATCH] bitmap: change return value of rte_bitmap_free

Morten Brørup mb at smartsharesystems.com
Wed Oct 29 01:15:23 CET 2025


> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> Sent: Tuesday, 28 October 2025 21.45
> 
> 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 at networkplumber.org>

Thank you for cleaning up this.

With or without suggestion inline below,
Reviewed-by: Morten Brørup <mb at smartsharesystems.com>

>  /**
> - * Bitmap free
> + * Bitmap free does nothing in current version.

Consider keeping the original headline and adding a note that it does nothing in current version instead.

>   *
>   * @param bmp
>   *   Handle to bitmap instance
> - * @return
> - *   0 upon success, error code otherwise
>   */
> -static inline int
> -rte_bitmap_free(struct rte_bitmap *bmp)
> +static inline void
> +rte_bitmap_free(struct rte_bitmap *bmp __rte_unused)
>  {
> -	/* Check input arguments */
> -	if (bmp == NULL) {
> -		return -1;
> -	}
> -
> -	return 0;
>  }



More information about the dev mailing list