Skip to content

Commit

Permalink
mempool: fix get function documentation
Browse files Browse the repository at this point in the history
[ upstream commit 9b3233ab09ea331dcf5fb38d215d91818bef3b47 ]

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: af75078 ("first public release")

Reported-by: Mahesh Adulla <mahesh.adulla@amd.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
  • Loading branch information
ferruhy authored and kevintraynor committed Dec 5, 2023
1 parent 69793a2 commit 1699794
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,7 @@ Maciej Paczkowski <maciej.paczkowski@intel.com>
Maciej Rabeda <maciej.rabeda@intel.com>
Maciej Szwed <maciej.szwed@intel.com>
Madhuker Mythri <madhuker.mythri@oracle.com>
Mahesh Adulla <mahesh.adulla@amd.com>
Mahipal Challa <mchalla@marvell.com>
Mah Yock Gen <yock.gen.mah@intel.com>
Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
Expand Down
2 changes: 1 addition & 1 deletion lib/mempool/rte_mempool.h
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,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.
* - <0: Error; code of ring dequeue function.
*/
static __rte_always_inline int
Expand Down

0 comments on commit 1699794

Please sign in to comment.