[PATCH] mempool: fix internal function documentation

lihuisong (C) lihuisong at huawei.com
Sat Oct 21 05:09:34 CEST 2023


Acked-by: Huisong Li <lihuisong at huawei.com>

在 2023/10/20 22:46, Ferruh Yigit 写道:
> static function `rte_mempool_do_generic_get()` returns zero on success,
> not >=0 as its function comment documents.
>
> Since this function called by public API, the comment causes confusion
> on the public API return value.
>
> Fixing the internal function documentation for return value.
>
> Fixes: af75078fece3 ("first public release")
> Cc: stable at dpdk.org
>
> Reported-by: Mahesh Adulla <mahesh.adulla at amd.com>
> Signed-off-by: Ferruh Yigit <ferruh.yigit at amd.com>
> ---
>   .mailmap                  | 1 +
>   lib/mempool/rte_mempool.h | 2 +-
>   2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/.mailmap b/.mailmap
> index 3f5bab26a81f..bfe451980f1c 100644
> --- a/.mailmap
> +++ b/.mailmap
> @@ -836,6 +836,7 @@ Maciej Rabeda <maciej.rabeda at intel.com>
>   Maciej Szwed <maciej.szwed at intel.com>
>   Madhu Chittim <madhu.chittim at intel.com>
>   Madhuker Mythri <madhuker.mythri at oracle.com>
> +Mahesh Adulla <mahesh.adulla at amd.com>
>   Mahipal Challa <mchalla at marvell.com>
>   Mah Yock Gen <yock.gen.mah at intel.com>
>   Mairtin o Loingsigh <mairtin.oloingsigh at intel.com>
> diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
> index f70bf36080fb..86598bc639e6 100644
> --- a/lib/mempool/rte_mempool.h
> +++ b/lib/mempool/rte_mempool.h
> @@ -1484,7 +1484,7 @@ rte_mempool_put(struct rte_mempool *mp, void *obj)
>    * @param cache
>    *   A pointer to a mempool cache structure. May be NULL if not needed.
>    * @return
> - *   - >=0: Success; number of objects supplied.
> + *   - 0: Success; number of objects supplied.
>    *   - <0: Error; code of driver dequeue function.
>    */
>   static __rte_always_inline int


More information about the stable mailing list