From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Fan Zhang <roy.fan.zhang@intel.com>,
Ashish Gupta <ashish.gupta@marvell.com>,
Akhil Goyal <gakhil@marvell.com>,
Harman Kalra <hkalra@marvell.com>,
Byron Marohn <byron.marohn@intel.com>,
Yipeng Wang <yipeng1.wang@intel.com>,
Jerin Jacob <jerinj@marvell.com>,
Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
Sameh Gobriel <sameh.gobriel@intel.com>,
Reshma Pattan <reshma.pattan@intel.com>,
Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
Jasvinder Singh <jasvinder.singh@intel.com>,
Olivier Matz <olivier.matz@6wind.com>,
Ciara Power <ciara.power@intel.com>
Subject: [PATCH v3 4/8] lib: document existing free functions
Date: Sun, 20 Feb 2022 10:21:43 -0800 [thread overview]
Message-ID: <20220220182147.9750-5-stephen@networkplumber.org> (raw)
In-Reply-To: <20220220182147.9750-1-stephen@networkplumber.org>
These functions all accept NULL as parameter.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/bitratestats/rte_bitrate.h | 1 +
lib/compressdev/rte_comp.h | 1 +
lib/cryptodev/rte_crypto.h | 1 +
lib/eal/include/rte_interrupts.h | 4 +++-
lib/efd/rte_efd.h | 1 +
lib/eventdev/rte_event_ring.h | 1 +
lib/fib/rte_fib.h | 1 +
lib/fib/rte_fib6.h | 1 +
lib/member/rte_member.h | 1 +
lib/reorder/rte_reorder.h | 1 +
lib/rib/rte_rib.h | 1 +
lib/rib/rte_rib6.h | 1 +
lib/sched/rte_sched.h | 1 +
lib/stack/rte_stack.h | 1 +
lib/telemetry/rte_telemetry.h | 2 +-
15 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/lib/bitratestats/rte_bitrate.h b/lib/bitratestats/rte_bitrate.h
index e494389b95a0..843baaf10900 100644
--- a/lib/bitratestats/rte_bitrate.h
+++ b/lib/bitratestats/rte_bitrate.h
@@ -32,6 +32,7 @@ struct rte_stats_bitrates *rte_stats_bitrate_create(void);
*
* @param bitrate_data
* Pointer allocated by rte_stats_bitrate_create()
+ * If NULL then, the function does nothing.
*/
void rte_stats_bitrate_free(struct rte_stats_bitrates *bitrate_data);
diff --git a/lib/compressdev/rte_comp.h b/lib/compressdev/rte_comp.h
index 95306c5d0364..b07434ad39b2 100644
--- a/lib/compressdev/rte_comp.h
+++ b/lib/compressdev/rte_comp.h
@@ -471,6 +471,7 @@ rte_comp_op_bulk_alloc(struct rte_mempool *mempool,
*
* @param op
* Compress operation
+ * If NULL then, the function does nothing.
*/
__rte_experimental
void
diff --git a/lib/cryptodev/rte_crypto.h b/lib/cryptodev/rte_crypto.h
index a864f5036f3a..326764b0f0c0 100644
--- a/lib/cryptodev/rte_crypto.h
+++ b/lib/cryptodev/rte_crypto.h
@@ -339,6 +339,7 @@ __rte_crypto_op_get_priv_data(struct rte_crypto_op *op, uint32_t size)
* be returned to the mempool.
*
* @param op symmetric crypto operation
+ * If NULL then, the function does nothing.
*/
static inline void
rte_crypto_op_free(struct rte_crypto_op *op)
diff --git a/lib/eal/include/rte_interrupts.h b/lib/eal/include/rte_interrupts.h
index edbf0faeeffd..3ef8ab4621fb 100644
--- a/lib/eal/include/rte_interrupts.h
+++ b/lib/eal/include/rte_interrupts.h
@@ -243,7 +243,8 @@ rte_intr_instance_alloc(uint32_t flags);
* resources.
*
* @param intr_handle
- * Interrupt handle address.
+ * Interrupt handle address.
+ * If NULL then, the function does nothing.
*
*/
__rte_experimental
@@ -746,6 +747,7 @@ rte_intr_vec_list_index_get(const struct rte_intr_handle *intr_handle,
*
* @param intr_handle
* pointer to the interrupt handle.
+ * If NULL then, the function does nothing.
*
* @return
* - On success, zero
diff --git a/lib/efd/rte_efd.h b/lib/efd/rte_efd.h
index d3d7befd0c90..afba38a78c8a 100644
--- a/lib/efd/rte_efd.h
+++ b/lib/efd/rte_efd.h
@@ -146,6 +146,7 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
*
* @param table
* Table to free
+ * If NULL then, the function does nothing.
*/
void
rte_efd_free(struct rte_efd_table *table);
diff --git a/lib/eventdev/rte_event_ring.h b/lib/eventdev/rte_event_ring.h
index c0861b0ec2db..85c214a678cd 100644
--- a/lib/eventdev/rte_event_ring.h
+++ b/lib/eventdev/rte_event_ring.h
@@ -233,6 +233,7 @@ rte_event_ring_lookup(const char *name);
*
* @param r
* Ring to free
+ * If NULL then, the function does nothing.
*/
void
rte_event_ring_free(struct rte_event_ring *r);
diff --git a/lib/fib/rte_fib.h b/lib/fib/rte_fib.h
index e592d3251af1..5df6e34bde70 100644
--- a/lib/fib/rte_fib.h
+++ b/lib/fib/rte_fib.h
@@ -124,6 +124,7 @@ rte_fib_find_existing(const char *name);
*
* @param fib
* FIB object handle
+ * If NULL then, the function does nothing.
* @return
* None
*/
diff --git a/lib/fib/rte_fib6.h b/lib/fib/rte_fib6.h
index cb133719e175..4029c8f3ee0d 100644
--- a/lib/fib/rte_fib6.h
+++ b/lib/fib/rte_fib6.h
@@ -115,6 +115,7 @@ rte_fib6_find_existing(const char *name);
*
* @param fib
* FIB object handle
+ * If NULL then, the function does nothing.
* @return
* None
*/
diff --git a/lib/member/rte_member.h b/lib/member/rte_member.h
index c0689e233e65..ada3b96e5ec1 100644
--- a/lib/member/rte_member.h
+++ b/lib/member/rte_member.h
@@ -444,6 +444,7 @@ rte_member_add(const struct rte_member_setsum *setsum, const void *key,
*
* @param setsum
* Pointer to the set summary.
+ * If NULL then, the function does nothing.
*/
void
rte_member_free(struct rte_member_setsum *setsum);
diff --git a/lib/reorder/rte_reorder.h b/lib/reorder/rte_reorder.h
index 9de02403746b..ecf83fb5c578 100644
--- a/lib/reorder/rte_reorder.h
+++ b/lib/reorder/rte_reorder.h
@@ -115,6 +115,7 @@ rte_reorder_reset(struct rte_reorder_buffer *b);
*
* @param b
* reorder buffer instance
+ * If NULL then, the function does nothing.
* @return
* None
*/
diff --git a/lib/rib/rte_rib.h b/lib/rib/rte_rib.h
index bebb30f7d7cf..bafd2585ac69 100644
--- a/lib/rib/rte_rib.h
+++ b/lib/rib/rte_rib.h
@@ -265,6 +265,7 @@ rte_rib_find_existing(const char *name);
*
* @param rib
* RIB object handle
+ * If NULL then, the function does nothing.
* @return
* None
*/
diff --git a/lib/rib/rte_rib6.h b/lib/rib/rte_rib6.h
index 6f532265c657..a2e179ccb4b9 100644
--- a/lib/rib/rte_rib6.h
+++ b/lib/rib/rte_rib6.h
@@ -320,6 +320,7 @@ rte_rib6_find_existing(const char *name);
*
* @param rib
* RIB object handle
+ * If NULL then, the function does nothing.
* @return
* None
*/
diff --git a/lib/sched/rte_sched.h b/lib/sched/rte_sched.h
index 3c625ba1698a..d212ad5774e6 100644
--- a/lib/sched/rte_sched.h
+++ b/lib/sched/rte_sched.h
@@ -330,6 +330,7 @@ rte_sched_port_config(struct rte_sched_port_params *params);
*
* @param port
* Handle to port scheduler instance
+ * If NULL then, the function does nothing.
*/
void
rte_sched_port_free(struct rte_sched_port *port);
diff --git a/lib/stack/rte_stack.h b/lib/stack/rte_stack.h
index 321f4cec1a10..8c3bd4862711 100644
--- a/lib/stack/rte_stack.h
+++ b/lib/stack/rte_stack.h
@@ -215,6 +215,7 @@ rte_stack_create(const char *name, unsigned int count, int socket_id,
*
* @param s
* Stack to free
+ * If NULL then, the function does nothing.
*/
void
rte_stack_free(struct rte_stack *s);
diff --git a/lib/telemetry/rte_telemetry.h b/lib/telemetry/rte_telemetry.h
index 7bca8a9a49e2..af95fb4f150b 100644
--- a/lib/telemetry/rte_telemetry.h
+++ b/lib/telemetry/rte_telemetry.h
@@ -289,7 +289,7 @@ rte_tel_data_alloc(void);
*
* @param data
* Pointer to container.
- *.
+ * If NULL then, the function does nothing.
*/
void
rte_tel_data_free(struct rte_tel_data *data);
--
2.34.1
next prev parent reply other threads:[~2022-02-20 18:22 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-19 23:43 [PATCH 0/3] more unnecessary null checks Stephen Hemminger
2022-02-19 23:43 ` [PATCH 1/3] cocci/nullfree: add more functions Stephen Hemminger
2022-02-19 23:43 ` [PATCH 2/3] acl: remove unncessary null checks in calls to rte_acl_free() Stephen Hemminger
2022-02-19 23:43 ` [PATCH 3/3] lpm: remove unnecessary NULL checks Stephen Hemminger
2022-02-20 0:51 ` [PATCH v2 0/7] fix more unnecessary null checks Stephen Hemminger
2022-02-20 0:51 ` [PATCH v2 1/7] cocci/nullfree: add more functions Stephen Hemminger
2022-02-20 0:51 ` [PATCH v2 2/7] acl: remove unnecessary null checks Stephen Hemminger
2022-02-20 0:51 ` [PATCH v2 3/7] lpm: remove unnecessary NULL checks Stephen Hemminger
2022-02-20 0:51 ` [PATCH v2 4/7] lib: document existing free functions Stephen Hemminger
2022-02-20 0:51 ` [PATCH v2 5/7] test: remove unecessary NULL checks before free Stephen Hemminger
2022-02-20 0:51 ` [PATCH v2 6/7] fips_validation: remove unnecessary NULL check Stephen Hemminger
2022-02-20 0:51 ` [PATCH v2 7/7] event/sw: " Stephen Hemminger
2022-02-20 5:18 ` [PATCH 0/3] more unnecessary null checks Jerin Jacob
2022-02-20 18:21 ` [PATCH v3 0/8] yet more unnecessary NULL checks Stephen Hemminger
2022-02-20 18:21 ` [PATCH v3 1/8] cocci/nullfree: add more functions Stephen Hemminger
2022-02-20 18:21 ` [PATCH v3 2/8] acl: remove unnecessary null checks Stephen Hemminger
2022-02-20 18:21 ` [PATCH v3 3/8] lpm: remove unnecessary NULL checks Stephen Hemminger
2022-02-21 2:47 ` Ruifeng Wang
2022-02-21 15:51 ` Medvedkin, Vladimir
2022-02-20 18:21 ` Stephen Hemminger [this message]
2022-02-27 20:48 ` [PATCH v3 4/8] lib: document existing free functions Thomas Monjalon
2022-02-28 9:42 ` Bruce Richardson
2022-02-28 17:08 ` Stephen Hemminger
2022-06-22 9:23 ` Thomas Monjalon
2022-06-22 14:55 ` Stephen Hemminger
2022-02-20 18:21 ` [PATCH v3 5/8] test: remove unnecessary NULL checks before free Stephen Hemminger
2022-02-20 18:21 ` [PATCH v3 6/8] fips_validation: remove unnecessary NULL check Stephen Hemminger
2022-02-20 18:21 ` [PATCH v3 7/8] event/sw: " Stephen Hemminger
2022-02-20 18:21 ` [PATCH v3 8/8] pipeline: remove unnecessary checks for NULL pointer before free Stephen Hemminger
2022-06-22 20:52 ` [PATCH v4] lib: document existing free functions Stephen Hemminger
2022-06-23 0:37 ` fengchengwen
2022-06-24 12:35 ` David Marchand
2022-06-24 12:41 ` [PATCH v3 0/8] yet more unnecessary NULL checks David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220220182147.9750-5-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=ashish.gupta@marvell.com \
--cc=byron.marohn@intel.com \
--cc=ciara.power@intel.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=hkalra@marvell.com \
--cc=jasvinder.singh@intel.com \
--cc=jerinj@marvell.com \
--cc=olivier.matz@6wind.com \
--cc=reshma.pattan@intel.com \
--cc=roy.fan.zhang@intel.com \
--cc=sameh.gobriel@intel.com \
--cc=vladimir.medvedkin@intel.com \
--cc=yipeng1.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).