|WARNING| pw160789 [PATCH v21] eal: RTE_PTR_ADD/SUB API improvements
checkpatch at dpdk.org
checkpatch at dpdk.org
Thu Feb 5 08:04:22 CET 2026
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/160789
_coding style issues_
WARNING:LONG_LINE_COMMENT: line length of 113 exceeds 100 columns
#281: FILE: app/test/test_common.c:37:
+ /* Aligned buffer for testing aligned pointer types - must be aligned to RTE_TEST_COMMON_MAX_ALIGNMENT */
WARNING:LONG_LINE_COMMENT: line length of 104 exceeds 100 columns
#622: FILE: app/test/test_common.c:378:
+ /* near_max + CACHE_LINE_ALIGN - 1 must not wrap, so BOUNDARY_TEST_OFFSET >= CACHE_LINE_ALIGN */
WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#640: FILE: app/test/test_common.c:396:
+ RTE_TEST_ASSERT(RTE_COMMON_TEST_EDGE_CASE_BUFFER_SIZE >= align,
ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#1563: FILE: lib/eal/include/rte_common.h:129:
+#define __rte_ptr_arith_add_zero + 0
BUT SEE:
do {} while (0) advice is over-stated in a few situations:
The more obvious case is macros, like MODULE_PARM_DESC, invoked at
file-scope, where C disallows code (it must be in functions). See
$exceptions if you have one to add by name.
More troublesome is declarative macros used at top of new scope,
like DECLARE_PER_CPU. These might just compile with a do-while-0
wrapper, but would be incorrect. Most of these are handled by
detecting struct,union,etc declaration primitives in $exceptions.
Theres also macros called inside an if (block), which "return" an
expression. These cannot do-while, and need a ({}) wrapper.
Enjoy this qualification while we work to improve our heuristics.
total: 1 errors, 3 warnings, 1523 lines checked
More information about the test-report
mailing list