[v3,4/8] lib: document existing free functions
Checks
Commit Message
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(-)
Comments
20/02/2022 19:21, Stephen Hemminger:
> + * If NULL then, the function does nothing.
I'm not English native, but I thought it should be one of these 2 forms:
- If NULL, the function does nothing.
- If NULL then the function does nothing.
On Sun, Feb 27, 2022 at 09:48:57PM +0100, Thomas Monjalon wrote:
> 20/02/2022 19:21, Stephen Hemminger:
> > + * If NULL then, the function does nothing.
>
> I'm not English native, but I thought it should be one of these 2 forms:
> - If NULL, the function does nothing.
> - If NULL then the function does nothing.
>
I would agree, and also would tend toward the first version.
/Bruce
On Mon, 28 Feb 2022 09:42:47 +0000
Bruce Richardson <bruce.richardson@intel.com> wrote:
> On Sun, Feb 27, 2022 at 09:48:57PM +0100, Thomas Monjalon wrote:
> > 20/02/2022 19:21, Stephen Hemminger:
> > > + * If NULL then, the function does nothing.
> >
> > I'm not English native, but I thought it should be one of these 2 forms:
> > - If NULL, the function does nothing.
> > - If NULL then the function does nothing.
> >
> I would agree, and also would tend toward the first version.
>
> /Bruce
Either one. I was just copy/pasting pre-existing grammar problem.
28/02/2022 18:08, Stephen Hemminger:
> On Mon, 28 Feb 2022 09:42:47 +0000
> Bruce Richardson <bruce.richardson@intel.com> wrote:
>
> > On Sun, Feb 27, 2022 at 09:48:57PM +0100, Thomas Monjalon wrote:
> > > 20/02/2022 19:21, Stephen Hemminger:
> > > > + * If NULL then, the function does nothing.
> > >
> > > I'm not English native, but I thought it should be one of these 2 forms:
> > > - If NULL, the function does nothing.
> > > - If NULL then the function does nothing.
> > >
> > I would agree, and also would tend toward the first version.
> >
> > /Bruce
>
> Either one. I was just copy/pasting pre-existing grammar problem.
Please do you want to respin?
On Wed, 22 Jun 2022 11:23:04 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:
> 28/02/2022 18:08, Stephen Hemminger:
> > On Mon, 28 Feb 2022 09:42:47 +0000
> > Bruce Richardson <bruce.richardson@intel.com> wrote:
> >
> > > On Sun, Feb 27, 2022 at 09:48:57PM +0100, Thomas Monjalon wrote:
> > > > 20/02/2022 19:21, Stephen Hemminger:
> > > > > + * If NULL then, the function does nothing.
> > > >
> > > > I'm not English native, but I thought it should be one of these 2 forms:
> > > > - If NULL, the function does nothing.
> > > > - If NULL then the function does nothing.
> > > >
> > > I would agree, and also would tend toward the first version.
> > >
> > > /Bruce
> >
> > Either one. I was just copy/pasting pre-existing grammar problem.
>
> Please do you want to respin?
>
>
Sure.
@@ -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);
@@ -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
@@ -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)
@@ -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
@@ -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);
@@ -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);
@@ -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
*/
@@ -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
*/
@@ -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);
@@ -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
*/
@@ -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
*/
@@ -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
*/
@@ -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);
@@ -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);
@@ -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);