From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9554D431A0; Sat, 21 Oct 2023 05:09:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 65B644027E; Sat, 21 Oct 2023 05:09:40 +0200 (CEST) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id 576224026F; Sat, 21 Oct 2023 05:09:38 +0200 (CEST) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SC5vs28lTz15NV8; Sat, 21 Oct 2023 11:06:49 +0800 (CST) Received: from [10.67.121.59] (10.67.121.59) by kwepemm000004.china.huawei.com (7.193.23.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Sat, 21 Oct 2023 11:09:35 +0800 Message-ID: <597e11c6-231e-9c3a-b17c-feff2c5dde3e@huawei.com> Date: Sat, 21 Oct 2023 11:09:34 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH] mempool: fix internal function documentation To: Ferruh Yigit , Thomas Monjalon , Andrew Rybchenko CC: , , Mahesh Adulla References: <20231020144647.1682698-1-ferruh.yigit@amd.com> From: "lihuisong (C)" In-Reply-To: <20231020144647.1682698-1-ferruh.yigit@amd.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.59] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm000004.china.huawei.com (7.193.23.18) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Acked-by: Huisong Li 在 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@dpdk.org > > Reported-by: Mahesh Adulla > Signed-off-by: Ferruh Yigit > --- > .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 Szwed > Madhu Chittim > Madhuker Mythri > +Mahesh Adulla > Mahipal Challa > Mah Yock Gen > Mairtin o Loingsigh > 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