|WARNING| pw167085 [RFC PATCH] pile stack and mempool driver resend

checkpatch at dpdk.org checkpatch at dpdk.org
Sat Aug 1 10:09:52 CEST 2026


Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/167085

_coding style issues_


WARNING:LONG_LINE: line length of 107 exceeds 100 columns
#158: FILE: app/test/test_stack.c:103:
+				       popped_objs[STACK_SIZE - RTE_STACK_PILE_BULK_SIZE - i], i, bulk_sz);

ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#248: FILE: app/test/test_stack_perf.c:17:
+#define MAX_BURST RTE_MEMPOOL_CACHE_MAX_SIZE / 2

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.

WARNING:TYPO_SPELLING: 'mimick' may be misspelled - perhaps 'mimic'?
#382: FILE: doc/guides/prog_guide/stack_lib.rst:126:
+implementations (and uses type casting to mimick C++ class inheritance).
                                           ^^^^^^

WARNING:MACRO_ARG_UNUSED: Argument 'alignment' is not used in function-like macro
#530: FILE: lib/eal/include/rte_common.h:574:
+#define __rte_assume_aligned(ptr, alignment) (ptr)

ERROR:POINTER_LOCATION: "(foo*)" should be "(foo *)"
#1013: FILE: lib/stack/rte_stack.h:56:
+		sizeof(struct rte_stack_lf_elem *) + sizeof(void*),

ERROR:POINTER_LOCATION: "foo * const * bar" should be "foo * const *bar"
#1097: FILE: lib/stack/rte_stack.h:178:
+rte_stack_push(struct rte_stack *s, void * const * __rte_restrict obj_table, unsigned int n)

ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1114: FILE: lib/stack/rte_stack.h:204:
+rte_stack_pop(struct rte_stack *s, void ** __rte_restrict obj_table, unsigned int n)

ERROR:POINTER_LOCATION: "foo * const * bar" should be "foo * const *bar"
#1144: FILE: lib/stack/rte_stack_lf.h:37:
+		    void * const * __rte_restrict obj_table,

ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1153: FILE: lib/stack/rte_stack_lf.h:74:
+__rte_stack_lf_pop(struct rte_stack *s, void ** __rte_restrict obj_table,

ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1175: FILE: lib/stack/rte_stack_lf_c11.h:102:
+			 void ** __rte_restrict obj_table,

ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1188: FILE: lib/stack/rte_stack_lf_generic.h:77:
+			 void ** __rte_restrict obj_table,

ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1201: FILE: lib/stack/rte_stack_lf_stubs.h:33:
+			 void ** __rte_restrict obj_table,

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#1220: FILE: lib/stack/rte_stack_pile.c:10:
+    unsigned int bulk = (count + RTE_STACK_PILE_BULK_SIZE - 1) / RTE_STACK_PILE_BULK_SIZE;$

WARNING:LONG_LINE: line length of 111 exceeds 100 columns
#1221: FILE: lib/stack/rte_stack_pile.c:11:
+	struct rte_stack_pile_bulk_elem * bulk_elems = (struct rte_stack_pile_bulk_elem *)(&s->stack_pile + 1);

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#1221: FILE: lib/stack/rte_stack_pile.c:11:
+	struct rte_stack_pile_bulk_elem * bulk_elems = (struct rte_stack_pile_bulk_elem *)(&s->stack_pile + 1);

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#1222: FILE: lib/stack/rte_stack_pile.c:12:
+	struct rte_stack_lf_elem * solo_elems = (struct rte_stack_lf_elem *)&bulk_elems[bulk];

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#1236: FILE: lib/stack/rte_stack_pile.c:26:
+    unsigned int bulk = (count + RTE_STACK_PILE_BULK_SIZE - 1) / RTE_STACK_PILE_BULK_SIZE;$

ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1321: FILE: lib/stack/rte_stack_pile.h:72:
+		void ** __rte_restrict obj_table,

WARNING:LONG_LINE: line length of 161 exceeds 100 columns
#1324: FILE: lib/stack/rte_stack_pile.h:75:
+	struct rte_stack_pile_bulk_elem *first = (struct rte_stack_pile_bulk_elem *)__rte_stack_lf_pop_elems(list, num, NULL, (struct rte_stack_lf_elem **)last);

WARNING:LONG_LINE: line length of 131 exceeds 100 columns
#1332: FILE: lib/stack/rte_stack_pile.h:83:
+			rte_memcpy(&obj_table[i * RTE_STACK_PILE_BULK_SIZE], tmp->objs, sizeof(void *) * RTE_STACK_PILE_BULK_SIZE);

ERROR:POINTER_LOCATION: "foo * const * bar" should be "foo * const *bar"
#1352: FILE: lib/stack/rte_stack_pile.h:103:
+		void * const * __rte_restrict obj_table,

WARNING:UNNECESSARY_ELSE: else is not generally useful after a break or return
#1368: FILE: lib/stack/rte_stack_pile.h:119:
+			return 0;
+		else

WARNING:LONG_LINE: line length of 106 exceeds 100 columns
#1386: FILE: lib/stack/rte_stack_pile.h:137:
+			__rte_stack_pile_bulk_push_elems(&pile->free_bulk, bulk_first, bulk_last, n_bulk);

WARNING:LONG_LINE: line length of 143 exceeds 100 columns
#1414: FILE: lib/stack/rte_stack_pile.h:165:
+		rte_memcpy(tmp_bulk->objs, &obj_table[(n_bulk - i - 1) * RTE_STACK_PILE_BULK_SIZE], sizeof(void *) * RTE_STACK_PILE_BULK_SIZE);

ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1436: FILE: lib/stack/rte_stack_pile.h:187:
+		void ** __rte_restrict obj_table,

WARNING:UNNECESSARY_ELSE: else is not generally useful after a break or return
#1452: FILE: lib/stack/rte_stack_pile.h:203:
+			return 0;
+		else

WARNING:LONG_LINE_COMMENT: line length of 116 exceeds 100 columns
#1460: FILE: lib/stack/rte_stack_pile.h:211:
+		/* Not available. Retry with fewer bulk elements; objects to be fetched as solo elements instead. */

WARNING:LONG_LINE: line length of 126 exceeds 100 columns
#1474: FILE: lib/stack/rte_stack_pile.h:225:
+	solo_first = __rte_stack_lf_pop_elems(&pile->solo, n_solo, &obj_table[n_bulk * RTE_STACK_PILE_BULK_SIZE], &solo_last);

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#1479: FILE: lib/stack/rte_stack_pile.h:230:
+	alignas(RTE_CACHE_LINE_SIZE) void * obj_frag[RTE_STACK_PILE_BULK_SIZE];

WARNING:LONG_LINE: line length of 101 exceeds 100 columns
#1487: FILE: lib/stack/rte_stack_pile.h:238:
+			__rte_stack_pile_bulk_push_elems(&pile->bulk, bulk_first, bulk_last, n_bulk);

WARNING:LONG_LINE: line length of 117 exceeds 100 columns
#1500: FILE: lib/stack/rte_stack_pile.h:251:
+	solo_first = __rte_stack_lf_pop_elems(&pile->free_solo, RTE_STACK_PILE_BULK_SIZE - n_solo, NULL, &solo_last);

WARNING:LONG_LINE: line length of 105 exceeds 100 columns
#1522: FILE: lib/stack/rte_stack_pile.h:273:
+	__rte_stack_lf_push_elems(&pile->solo, solo_first, solo_last, RTE_STACK_PILE_BULK_SIZE - n_solo);

ERROR:POINTER_LOCATION: "foo * const * bar" should be "foo * const *bar"
#1583: FILE: lib/stack/rte_stack_std.h:24:
+__rte_stack_std_push(struct rte_stack *s, void * const * __rte_restrict obj_table,

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#1589: FILE: lib/stack/rte_stack_std.h:27:
+	struct rte_stack_std * __rte_restrict stack = &s->stack_std;

ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1590: FILE: lib/stack/rte_stack_std.h:28:
+	void ** __rte_restrict stack_objs;

ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1619: FILE: lib/stack/rte_stack_std.h:60:
+__rte_stack_std_pop(struct rte_stack *s, void ** __rte_restrict obj_table, unsigned int n)

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#1624: FILE: lib/stack/rte_stack_std.h:62:
+	struct rte_stack_std * __rte_restrict stack = &s->stack_std;

ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1626: FILE: lib/stack/rte_stack_std.h:64:
+	void ** __rte_restrict stack_objs;

total: 21 errors, 17 warnings, 1371 lines checked
Warning in lib/mempool/rte_mempool.c:
Using rte_panic/rte_exit
Warning in lib/stack/rte_stack_pile.h:
Adding __rte_always_inline; prefer plain inline
Warning in app/test/test_stack.c:
Using compilers pragma is not allowed


More information about the test-report mailing list