lib: remove extra characters ending comment blocks
PATCH 1/1 lib: remove extra characters ending comment blocks
At the end of a comment, no need for an extra line.
This pattern was fixed with the following command:
git ls lib | xargs sed -i '/^ *\* *$/{N;/ *\*\/ *$/D;}'
A comment should always be terminated with */
Extra asterisks were found with this command:
git grep '\* *\*/' lib
--- lib/argparse/rte_argparse.h | 1 - lib/bbdev/rte_bbdev.h | 3 --- lib/eal/include/rte_bitset.h | 1 - lib/ethdev/rte_flow.h | 1 - lib/eventdev/eventdev_pmd.h | 4 ---- lib/eventdev/rte_event_dma_adapter.h | 1 - lib/eventdev/rte_eventdev.h | 3 --- lib/fib/rte_fib.h | 2 +- lib/graph/rte_graph_feature_arc_worker.h | 1 - lib/hash/rte_hash_crc.c | 1 - lib/mempool/rte_mempool.h | 5 ++--- lib/node/rte_node_udp4_input_api.h | 1 - lib/ptr_compress/rte_ptr_compress.h | 16 ++++++++-------- 13 files changed, 11 insertions(+), 29 deletions(-)
lib/argparse/rte_argparse.h +0 -1
@@ -24,7 +24,6 @@* There are two ways to parse arguments: * 1) AutoSave: for which known value types, the way can be used. * 2) Callback: will invoke user callback to parse. -* */ #include <stdbool.h>
lib/bbdev/rte_bbdev.h +0 -3
@@ -1117,7 +1117,6 @@ rte_bbdev_enqueue_status_str(enum rte_bbdev_enqueue_status status);* - 0 on success * - ENOTSUP if interrupts are not supported by the identified device * - negative value on failure - as returned from PMD -* */ __rte_experimental int
@@ -1141,7 +1140,6 @@ rte_bbdev_queue_ops_dump(uint16_t dev_id, uint16_t queue_index, FILE *file);* * @returns * String describing the provided operation. -* */ __rte_experimental char *
@@ -1155,7 +1153,6 @@ rte_bbdev_ops_param_string(void *op, enum rte_bbdev_op_type op_type, char *str,* * @param op_type * Operation type enum. -* */ __rte_experimental void
lib/eal/include/rte_bitset.h +0 -1
@@ -27,7 +27,6 @@* All functions modifying a bitset may overwrite any unused bits of * the last word. Such unused bits are ignored by all functions reading * bits. -* */ #include <limits.h>
lib/ethdev/rte_flow.h +0 -1
@@ -4274,7 +4274,6 @@ rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)* RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX * * Redirects packets to a particular index in a flow table. -* */ struct rte_flow_action_jump_to_table_index {struct rte_flow_template_table *table;
lib/eventdev/eventdev_pmd.h +0 -4
@@ -1427,7 +1427,6 @@ typedef int (*eventdev_eth_tx_adapter_queue_stop)* - 0: Success, driver provides event adapter capabilities for the * dmadev. * - <0: Error code returned by the driver function. -* */ typedef int (*eventdev_dma_adapter_caps_get_t )(const struct rte_eventdev *dev,const int16_t dma_dev_id,uint32_t *caps);
@@ -1454,7 +1453,6 @@ typedef int (*eventdev_dma_adapter_caps_get_t)(const struct rte_eventdev *dev,* @return * - 0: Success, dmadev vchan added successfully. * - <0: Error code returned by the driver function. -* */ typedef int (*eventdev_dma_adapter_vchan_add_t)(const struct rte_eventdev *dev, const int16_t dma_dev_id,
@@ -1478,7 +1476,6 @@ typedef int (*eventdev_dma_adapter_vchan_add_t)(const struct rte_eventdev *dev,* @return * - 0: Success, dmadev vchan deleted successfully. * - <0: Error code returned by the driver function. -* */ typedef int (*eventdev_dma_adapter_vchan_del_t)(const struct rte_eventdev *dev, const int16_t dma_dev_id,
@@ -1570,7 +1567,6 @@ typedef int (*eventdev_dma_adapter_stats_reset)(const struct rte_eventdev *dev,* * @return * Return 0 on success. -* */ typedef int (*eventdev_vector_adapter_caps_get_t )(const struct rte_eventdev *dev,uint32_t *caps,const struct event_vector_adapter_ops **ops);
lib/eventdev/rte_event_dma_adapter.h +0 -1
@@ -138,7 +138,6 @@* rte_event_dma_adapter_vchan_del() APIs. If HW supports the capability * RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND, event information must be passed to the * add API. -* */ #include <stdint.h>
lib/eventdev/rte_eventdev.h +0 -3
@@ -1951,7 +1951,6 @@ rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id,* - 0: Success, driver provides event adapter capabilities for the * dmadev device. * - <0: Error code returned by the driver function. -* */ __rte_experimental int
@@ -2209,7 +2208,6 @@ rte_event_port_unlink(uint8_t dev_id, uint8_t port_id,* (EDQUOT) Quota exceeded(Application tried to link the queue configured with * RTE_EVENT_QUEUE_CFG_SINGLE_LINK to more than one event ports) * (EINVAL) Invalid parameter -* */ __rte_experimental int
@@ -2262,7 +2260,6 @@ rte_event_port_profile_links_set(uint8_t dev_id, uint8_t port_id, const uint8_t* If return value is less than *nb_unlinks* then implementation shall update * the rte_errno accordingly, Possible rte_errno values are * (EINVAL) Invalid parameter -* */ __rte_experimental int
lib/fib/rte_fib.h +1 -1
@@ -109,7 +109,7 @@ struct rte_fib_conf {uint32_t num_tbl8; } dir24_8; }; -unsigned int flags;/**< Optional feature flags from RTE_FIB_F_* **/ +unsigned int flags;/**< Optional feature flags from RTE_FIB_F_* */ };/** FIB RCU QSBR configuration structure. */
lib/graph/rte_graph_feature_arc_worker.h +0 -1
@@ -573,7 +573,6 @@ rte_graph_feature_data_first_feature_get(struct rte_graph_feature_arc *arc,* @return * 0: If no feature enabled * Non-Zero: Bitmask of features enabled. -* */ __rte_experimental static __rte_always_inline uint64_t
lib/hash/rte_hash_crc.c +0 -1
@@ -26,7 +26,6 @@ uint8_t rte_hash_crc32_alg = CRC32_SW;* - (CRC32_SSE42) Use SSE4.2 intrinsics if available * - (CRC32_SSE42_x64) Use 64-bit SSE4.2 intrinsic if available (default x86) * - (CRC32_ARM64) Use ARMv8 CRC intrinsic if available (default ARMv8) -* */ RTE_EXPORT_SYMBOL (rte_hash_crc_set_alg) void
lib/mempool/rte_mempool.h +2 -3
@@ -1955,7 +1955,7 @@ struct rte_mempool_mem_range_info {* and whether these addresses are contiguous. * @return * 0 on success, -EINVAL if mempool is not valid or mem_range is NULL. -**/ +*/ __rte_experimental int rte_mempool_get_mem_range(const struct rte_mempool *mp,
@@ -1971,8 +1971,7 @@ rte_mempool_get_mem_range(const struct rte_mempool *mp,* Pointer to a mempool. * @return * Object alignment if mp is valid. 0 if mp is NULL. -* -**/ +*/ __rte_experimental size_trte_mempool_get_obj_alignment (const struct rte_mempool *mp);
lib/node/rte_node_udp4_input_api.h +0 -1
@@ -14,7 +14,6 @@* * This API allows to control path functions of udp4_* nodes * like udp4_input. -* */ #include <rte_common.h> #include <rte_compat.h>
lib/ptr_compress/rte_ptr_compress.h +8 -8
@@ -52,7 +52,7 @@ extern "C" {* Length of the memory region the pointers are constrained to. * @return * Number of bits required to store a value. -**/ +*/ #define RTE_PTR_COMPRESS_BITS_NEEDED_FOR_POINTER_WITHIN_RANGE (mem_length) \ (((uint64_t)mem_length) < 2 ? 1 : \ (sizeof(uint64_t) * CHAR_BIT - \
@@ -66,7 +66,7 @@ extern "C" {* Memory alignment. * @return * Size of shift allowed without dropping any information from the pointer. -**/ +*/ #define RTE_PTR_COMPRESS_BIT_SHIFT_FROM_ALIGNMENT (alignment) \ ((alignment) == 0 ? 0 : rte_ctz64((uint64_t)alignment))
@@ -81,7 +81,7 @@ extern "C" {* The alignment of objects pointed to. * @return * 1 if function can be used, 0 otherwise. -**/ +*/ #define RTE_PTR_COMPRESS_CAN_COMPRESS_16_SHIFT (mem_length, obj_alignment) \ ((RTE_PTR_COMPRESS_BITS_NEEDED_FOR_POINTER_WITHIN_RANGE(mem_length) - \ RTE_PTR_COMPRESS_BIT_SHIFT_FROM_ALIGNMENT(obj_alignment)) <= 16 ? 1 : 0)
@@ -97,7 +97,7 @@ extern "C" {* The alignment of objects pointed to. * @return * 1 if function can be used, 0 otherwise. -**/ +*/ #define RTE_PTR_COMPRESS_CAN_COMPRESS_32_SHIFT (mem_length, obj_alignment) \ ((RTE_PTR_COMPRESS_BITS_NEEDED_FOR_POINTER_WITHIN_RANGE(mem_length) - \ RTE_PTR_COMPRESS_BIT_SHIFT_FROM_ALIGNMENT(obj_alignment)) <= 32 ? 1 : 0)
@@ -124,7 +124,7 @@ extern "C" {* Byte alignment of memory pointed to by the pointers allows for * bits to be dropped from the offset and hence widen the memory region that * can be covered. This controls how many bits are right shifted. -**/ +*/ static __rte_always_inline voidrte_ptr_compress_32_shift (void *ptr_base,void *const *src_table,uint32_t *dest_table,size_t n,uint8_t bit_shift)
@@ -185,7 +185,7 @@ rte_ptr_compress_32_shift(void *ptr_base, void * const *src_table,* bits to be dropped from the offset and hence widen the memory region that * can be covered. This controls how many bits are left shifted when pointers * are recovered from the offsets. -**/ +*/ static __rte_always_inline voidrte_ptr_decompress_32_shift (void *ptr_base,uint32_t const *src_table,void **dest_table,size_t n,uint8_t bit_shift)
@@ -249,7 +249,7 @@ rte_ptr_decompress_32_shift(void *ptr_base, uint32_t const *src_table,* Byte alignment of memory pointed to by the pointers allows for * bits to be dropped from the offset and hence widen the memory region that * can be covered. This controls how many bits are right shifted. -**/ +*/ static __rte_always_inline voidrte_ptr_compress_16_shift (void *ptr_base,void *const *src_table,uint16_t *dest_table,size_t n,uint8_t bit_shift)
@@ -293,7 +293,7 @@ rte_ptr_compress_16_shift(void *ptr_base, void * const *src_table,* bits to be dropped from the offset and hence widen the memory region that * can be covered. This controls how many bits are left shifted when pointers * are recovered from the offsets. -**/ +*/ static __rte_always_inline voidrte_ptr_decompress_16_shift (void *ptr_base,uint16_t const *src_table,void **dest_table,size_t n,uint8_t bit_shift)
Signature · 1 line
2.52.0
Thank you for cleaning this up.
(I haven't looked for more; only reviewed the changes in this patch).
Quoted 11 lines · On Thu, 29 Jan 2026 15:47:48 +0100 Thomas Monjalon <[email protected]> wrote:
At the end of a comment, no need for an extra line.
This pattern was fixed with the following command:
git ls lib | xargs sed -i '/^ *\* *$/{N;/ *\*\/ *$/D;}'A comment should always be terminated with */
Extra asterisks were found with this command:
git grep '\* *\*/' libSigned-off-by Thomas Monjalon <[email protected]>
Should look at examples and drivers as well.
Maybe add this to the AGENTS auto review script.
Thomas Monjalon
Applied29/01/2026 21:14, Stephen Hemminger:
Quoted 8 lines
Quoted 5 lines · On Thu, 29 Jan 2026 15:47:48 +0100 Thomas Monjalon <[email protected]> wrote:
At the end of a comment, no need for an extra line.
This pattern was fixed with the following command:
git ls lib | xargs sed -i '/^ *\* *$/{N;/ *\*\/ *$/D;}'
Quoted 8 lines
Quoted 6 lines
A comment should always be terminated with */
Extra asterisks were found with this command:
git grep '\* *\*/' libSigned-off-by Thomas Monjalon <[email protected]>
Applied.
Quoted 11 lines · Thomas Monjalon
At the end of a comment, no need for an extra line.
This pattern was fixed with the following command:
git ls lib | xargs sed -i '/^ *\* *$/{N;/ *\*\/ *$/D;}'A comment should always be terminated with */
Extra asterisks were found with this command:
git grep '\* *\*/' libSigned-off-by Thomas Monjalon <[email protected]>