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 C0760A00C4; Fri, 28 Jan 2022 22:47:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4FCC04279A; Fri, 28 Jan 2022 22:47:22 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id 5128840041 for ; Fri, 28 Jan 2022 22:47:21 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 984F15C019D; Fri, 28 Jan 2022 16:47:19 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 28 Jan 2022 16:47:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=8HoJwdBIBsjGAk ywgxv4vGYwViY/754qkm6v10L9q9g=; b=VzxM7r2EI3x7v/WJ5AmArA+ZQ8q3I1 frm70rwbRZFaNnHVJW2WyzqnnGtJGh0F6TvtpgsRqeF7G+ubeoaSWLKEktcVDw0T ouQ+YszMZPDhBSdfX8ul1sw8/DQhyujd2iV+xk/TBJdFmcO9xUPqOlukT8xUNnKn iv0miPDvbHRiEBn1f7aRO+Air8GAljP+OZWASMBtWlbqQbM9rmhKE8V/2ifqc2Xa vRUpCAY8Z0ptiRie0+LFIGzLFdCH3IEmDfVf2z8MkWPWB0ZnBQCBC5ssheW1GmSJ aoW7nVe4m4jbBfpXbjRhEqnFE+aWcEaochbhSgzXp0VpesNAxZsL+Ilg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=8HoJwdBIBsjGAkywgxv4vGYwViY/754qkm6v10L9q 9g=; b=JdkGrVfrzslOWV7d2RGYJ9P9q6FdphMuU3Y1ZuaVT6W2Q7oto7iYEV4fm Y5V+uNTHtS1cwGC1Nb6ViYPGq7I9DOyDvfK5DuHoCgTP3kmAbvd4UvfLIca/WxWc 2x9reOfVFRXl2yAit5VvblIWzvyCvIvNqViETgWODZfYdKVuqyNAZ0Hcx64g6Ioc i3fwWt5elzfnnrlOfZ7/gXJBkkBwt448DAEht1GeXlizydecmoE9rU7DxTw9a/TW oJmuD/eMkjbY5G86B0tn3GOa7YKIF3QIObLO9mz6KPaRV8sqC72XjaP2KYy3GViQ X9ZxC+yCAQbyqQNVr9TJlN4nSV7+Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrfeehgdduheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 28 Jan 2022 16:47:17 -0500 (EST) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org, Yipeng Wang , Sameh Gobriel , Bruce Richardson , Vladimir Medvedkin , Olivier Matz , Andrew Rybchenko , Honnappa Nagarahalli , Konstantin Ananyev Subject: Re: [PATCH v2 01/83] lib: update documentation of XXX_free() functions Date: Fri, 28 Jan 2022 22:47:15 +0100 Message-ID: <109562095.nniJfEyVGO@thomas> In-Reply-To: <20220124174719.14417-2-stephen@networkplumber.org> References: <20220124000518.319850-1-stephen@networkplumber.org> <20220124174719.14417-1-stephen@networkplumber.org> <20220124174719.14417-2-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 24/01/2022 18:45, Stephen Hemminger: > These functions all behave like libc free() and do > nothing if handed a NULL pointer. The code is already doing > this, this patch just documents the behavior. > > Signed-off-by: Stephen Hemminger > --- > /** > * De-allocate all memory used by hash table. > + * > + * If the pointer is NULL, the function does nothing. Would be better to move in the context of the parameter. > + * > * @param h > * Hash table to free Here: If NULL, the function does nothing. Same for comment for all files of this patch. > @@ -108,6 +108,8 @@ struct rte_kvargs *rte_kvargs_parse_delim(const char *args, > * Free a rte_kvargs structure previously allocated with > * rte_kvargs_parse(). > * > + * If the pointer is NULL, the function does nothing. > + * > * @param kvlist > * The rte_kvargs structure. No error if NULL. Would need to reword "No error" to "Does nothing". > @@ -1372,6 +1372,8 @@ rte_pktmbuf_free_seg(struct rte_mbuf *m) > * Free an mbuf, and all its segments in case of chained buffers. Each > * segment is added back into its original mempool. > * > + * If the pointer is NULL, the function does nothing. > + * > * @param m > * The packet mbuf to be freed. If NULL, the function does nothing. Here the comment exists already in the right place.