[dpdk-test-report] |WARNING| pw19934 [PATCH RFCv2 1/4] ring: create common ring files
checkpatch at dpdk.org
checkpatch at dpdk.org
Tue Jan 24 11:39:57 CET 2017
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/19934
_coding style issues_
WARNING:TYPO_SPELLING: 'preemptable' may be misspelled - perhaps 'preemptible'?
#170: FILE: lib/librte_ring/rte_common_ring.h:85:
+ * Note: the ring implementation is not preemptable. A lcore must not
ERROR:CODE_INDENT: code indent should use tabs where possible
#222: FILE: lib/librte_ring/rte_common_ring.h:137:
+ * if RTE_RING_PAUSE_REP not defined. */$
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#222: FILE: lib/librte_ring/rte_common_ring.h:137:
+ * if RTE_RING_PAUSE_REP not defined. */
WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line
#222: FILE: lib/librte_ring/rte_common_ring.h:137:
+#define RTE_RING_PAUSE_REP_COUNT 0 /**< Yield after pause num of times, no yield
+ * if RTE_RING_PAUSE_REP not defined. */
ERROR:CODE_INDENT: code indent should use tabs where possible
#276: FILE: lib/librte_ring/rte_common_ring.h:191:
+^I * not volatile so need to be careful$
WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line
#276: FILE: lib/librte_ring/rte_common_ring.h:191:
+ void *ring[] __rte_cache_aligned; /**< Memory space of ring starts here.
+ * not volatile so need to be careful
ERROR:CODE_INDENT: code indent should use tabs where possible
#277: FILE: lib/librte_ring/rte_common_ring.h:192:
+^I * about compiler re-ordering */$
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#277: FILE: lib/librte_ring/rte_common_ring.h:192:
+ * about compiler re-ordering */
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#283: FILE: lib/librte_ring/rte_common_ring.h:198:
+#define RTE_RING_SZ_MASK (unsigned)(0x0fffffff) /**< Ring size mask */
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#296: FILE: lib/librte_ring/rte_common_ring.h:211:
+ unsigned __lcore_id = rte_lcore_id(); \
ERROR:SPACING: space required before the open parenthesis '('
#301: FILE: lib/librte_ring/rte_common_ring.h:216:
+ } while(0)
ERROR:SPACING: space required before the open parenthesis '('
#303: FILE: lib/librte_ring/rte_common_ring.h:218:
+#define __RING_STAT_ADD(r, name, n) do {} while(0)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#320: FILE: lib/librte_ring/rte_common_ring.h:235:
+ssize_t rte_ring_get_memsize(unsigned count);
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#356: FILE: lib/librte_ring/rte_common_ring.h:271:
+int rte_ring_init(struct rte_ring *r, const char *name, unsigned count,
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#357: FILE: lib/librte_ring/rte_common_ring.h:272:
+ unsigned flags);
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#398: FILE: lib/librte_ring/rte_common_ring.h:313:
+struct rte_ring *rte_ring_create(const char *name, unsigned count,
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#399: FILE: lib/librte_ring/rte_common_ring.h:314:
+ int socket_id, unsigned flags);
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#426: FILE: lib/librte_ring/rte_common_ring.h:341:
+int rte_ring_set_water_mark(struct rte_ring *r, unsigned count);
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#440: FILE: lib/librte_ring/rte_common_ring.h:355:
+ * single and multi producer enqueue functions */
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#445: FILE: lib/librte_ring/rte_common_ring.h:360:
+ for (i = 0; i < (n & ((~(unsigned)0x3))); i+=4, idx+=4) { \
ERROR:SPACING: spaces required around that '+=' (ctx:VxV)
#445: FILE: lib/librte_ring/rte_common_ring.h:360:
+ for (i = 0; i < (n & ((~(unsigned)0x3))); i+=4, idx+=4) { \
^
ERROR:SPACING: spaces required around that '+=' (ctx:VxV)
#445: FILE: lib/librte_ring/rte_common_ring.h:360:
+ for (i = 0; i < (n & ((~(unsigned)0x3))); i+=4, idx+=4) { \
^
ERROR:SWITCH_CASE_INDENT_LEVEL: switch and case should be at the same indent
#451: FILE: lib/librte_ring/rte_common_ring.h:366:
+ switch (n & 0x3) { \
+ case 3: r->ring[idx++] = obj_table[i++]; \
+ case 2: r->ring[idx++] = obj_table[i++]; \
+ case 1: r->ring[idx++] = obj_table[i++]; \
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#452: FILE: lib/librte_ring/rte_common_ring.h:367:
+ case 3: r->ring[idx++] = obj_table[i++]; \
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#453: FILE: lib/librte_ring/rte_common_ring.h:368:
+ case 2: r->ring[idx++] = obj_table[i++]; \
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#454: FILE: lib/librte_ring/rte_common_ring.h:369:
+ case 1: r->ring[idx++] = obj_table[i++]; \
ERROR:SPACING: space required before the open parenthesis '('
#462: FILE: lib/librte_ring/rte_common_ring.h:377:
+} while(0)
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#466: FILE: lib/librte_ring/rte_common_ring.h:381:
+ * single and multi consumer dequeue functions */
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#471: FILE: lib/librte_ring/rte_common_ring.h:386:
+ for (i = 0; i < (n & (~(unsigned)0x3)); i+=4, idx+=4) {\
ERROR:SPACING: spaces required around that '+=' (ctx:VxV)
#471: FILE: lib/librte_ring/rte_common_ring.h:386:
+ for (i = 0; i < (n & (~(unsigned)0x3)); i+=4, idx+=4) {\
^
ERROR:SPACING: spaces required around that '+=' (ctx:VxV)
#471: FILE: lib/librte_ring/rte_common_ring.h:386:
+ for (i = 0; i < (n & (~(unsigned)0x3)); i+=4, idx+=4) {\
^
ERROR:SWITCH_CASE_INDENT_LEVEL: switch and case should be at the same indent
#477: FILE: lib/librte_ring/rte_common_ring.h:392:
+ switch (n & 0x3) { \
+ case 3: obj_table[i++] = r->ring[idx++]; \
+ case 2: obj_table[i++] = r->ring[idx++]; \
+ case 1: obj_table[i++] = r->ring[idx++]; \
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#478: FILE: lib/librte_ring/rte_common_ring.h:393:
+ case 3: obj_table[i++] = r->ring[idx++]; \
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#479: FILE: lib/librte_ring/rte_common_ring.h:394:
+ case 2: obj_table[i++] = r->ring[idx++]; \
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#480: FILE: lib/librte_ring/rte_common_ring.h:395:
+ case 1: obj_table[i++] = r->ring[idx++]; \
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#517: FILE: lib/librte_ring/rte_common_ring.h:432:
+ unsigned n, enum rte_ring_queue_behavior behavior)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#521: FILE: lib/librte_ring/rte_common_ring.h:436:
+ const unsigned max = n;
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#523: FILE: lib/librte_ring/rte_common_ring.h:438:
+ unsigned i, rep = 0;
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#528: FILE: lib/librte_ring/rte_common_ring.h:443:
+ * potentially harmful when n equals 0. */
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#542: FILE: lib/librte_ring/rte_common_ring.h:457:
+ * and size(ring)-1. */
ERROR:ELSE_AFTER_BRACE: else should follow close brace '}'
#551: FILE: lib/librte_ring/rte_common_ring.h:466:
+ }
+ else {
ERROR:ELSE_AFTER_BRACE: else should follow close brace '}'
#577: FILE: lib/librte_ring/rte_common_ring.h:492:
+ }
+ else {
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#591: FILE: lib/librte_ring/rte_common_ring.h:506:
+ * to proceed and finish with ring dequeue operation. */
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#626: FILE: lib/librte_ring/rte_common_ring.h:541:
+ unsigned n, enum rte_ring_queue_behavior behavior)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#630: FILE: lib/librte_ring/rte_common_ring.h:545:
+ unsigned i;
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#639: FILE: lib/librte_ring/rte_common_ring.h:554:
+ * and size(ring)-1. */
ERROR:ELSE_AFTER_BRACE: else should follow close brace '}'
#648: FILE: lib/librte_ring/rte_common_ring.h:563:
+ }
+ else {
ERROR:ELSE_AFTER_BRACE: else should follow close brace '}'
#672: FILE: lib/librte_ring/rte_common_ring.h:587:
+ }
+ else {
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#710: FILE: lib/librte_ring/rte_common_ring.h:625:
+ unsigned n, enum rte_ring_queue_behavior behavior)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#714: FILE: lib/librte_ring/rte_common_ring.h:629:
+ const unsigned max = n;
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#716: FILE: lib/librte_ring/rte_common_ring.h:631:
+ unsigned i, rep = 0;
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#720: FILE: lib/librte_ring/rte_common_ring.h:635:
+ * potentially harmful when n equals 0. */
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#734: FILE: lib/librte_ring/rte_common_ring.h:649:
+ * and size(ring)-1. */
ERROR:ELSE_AFTER_BRACE: else should follow close brace '}'
#743: FILE: lib/librte_ring/rte_common_ring.h:658:
+ }
+ else {
ERROR:SPACING: space required before the open brace '{'
#744: FILE: lib/librte_ring/rte_common_ring.h:659:
+ if (unlikely(entries == 0)){
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#771: FILE: lib/librte_ring/rte_common_ring.h:686:
+ * to proceed and finish with ring dequeue operation. */
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#809: FILE: lib/librte_ring/rte_common_ring.h:724:
+ unsigned n, enum rte_ring_queue_behavior behavior)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#813: FILE: lib/librte_ring/rte_common_ring.h:728:
+ unsigned i;
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#821: FILE: lib/librte_ring/rte_common_ring.h:736:
+ * and size(ring)-1. */
ERROR:ELSE_AFTER_BRACE: else should follow close brace '}'
#829: FILE: lib/librte_ring/rte_common_ring.h:744:
+ }
+ else {
ERROR:SPACING: space required before the open brace '{'
#830: FILE: lib/librte_ring/rte_common_ring.h:745:
+ if (unlikely(entries == 0)){
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#871: FILE: lib/librte_ring/rte_common_ring.h:786:
+ unsigned n)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#893: FILE: lib/librte_ring/rte_common_ring.h:808:
+ unsigned n)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#919: FILE: lib/librte_ring/rte_common_ring.h:834:
+ unsigned n)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1012: FILE: lib/librte_ring/rte_common_ring.h:927:
+rte_ring_mc_dequeue_bulk(struct rte_ring *r, void **obj_table, unsigned n)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1033: FILE: lib/librte_ring/rte_common_ring.h:948:
+rte_ring_sc_dequeue_bulk(struct rte_ring *r, void **obj_table, unsigned n)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1057: FILE: lib/librte_ring/rte_common_ring.h:972:
+rte_ring_dequeue_bulk(struct rte_ring *r, void **obj_table, unsigned n)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1230: FILE: lib/librte_ring/rte_common_ring.h:1145:
+static inline unsigned __attribute__((always_inline))
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1232: FILE: lib/librte_ring/rte_common_ring.h:1147:
+ unsigned n)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1249: FILE: lib/librte_ring/rte_common_ring.h:1164:
+static inline unsigned __attribute__((always_inline))
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1251: FILE: lib/librte_ring/rte_common_ring.h:1166:
+ unsigned n)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1272: FILE: lib/librte_ring/rte_common_ring.h:1187:
+static inline unsigned __attribute__((always_inline))
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1274: FILE: lib/librte_ring/rte_common_ring.h:1189:
+ unsigned n)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1299: FILE: lib/librte_ring/rte_common_ring.h:1214:
+static inline unsigned __attribute__((always_inline))
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1300: FILE: lib/librte_ring/rte_common_ring.h:1215:
+rte_ring_mc_dequeue_burst(struct rte_ring *r, void **obj_table, unsigned n)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1319: FILE: lib/librte_ring/rte_common_ring.h:1234:
+static inline unsigned __attribute__((always_inline))
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1320: FILE: lib/librte_ring/rte_common_ring.h:1235:
+rte_ring_sc_dequeue_burst(struct rte_ring *r, void **obj_table, unsigned n)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1341: FILE: lib/librte_ring/rte_common_ring.h:1256:
+static inline unsigned __attribute__((always_inline))
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1342: FILE: lib/librte_ring/rte_common_ring.h:1257:
+rte_ring_dequeue_burst(struct rte_ring *r, void **obj_table, unsigned n)
WARNING:MISSING_EOF_NEWLINE: adding a line without newline at end of file
#2636: FILE: lib/librte_ring/rte_ring.h:1:
+rte_common_ring.h
total: 26 errors, 54 warnings, 1283 lines checked
More information about the test-report
mailing list