[dpdk-test-report] |WARNING| pw32022 [PATCH RFC v1 4/9] lib/python: add embedded python lib

checkpatch at dpdk.org checkpatch at dpdk.org
Fri Dec 8 09:24:36 CET 2017


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

_coding style issues_


ERROR:SPACING: need consistent spacing around '*' (ctx:WxV)
#201: FILE: lib/librte_python/rte_python.c:49:
+typedef PyObject *PyPtr;
                  ^

WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon
#206: FILE: lib/librte_python/rte_python.c:54:
+#define DBG(o) py_priv_debug(# o, o);

WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#208: FILE: lib/librte_python/rte_python.c:56:
+#define CHK(o, expr)									\
+	do {										\
+		o = (expr);								\
+		if (!o) {								\
+			RTE_LOG(WARNING, PYTHON, "%s = %s: null
", # o, # expr);	\
+			goto err;							\
+		}									\
+	} while (0);

WARNING:DO_WHILE_MACRO_WITH_TRAILING_SEMICOLON: do {} while (0) macros should not be semicolon terminated
#208: FILE: lib/librte_python/rte_python.c:56:
+#define CHK(o, expr)									\
+	do {										\
+		o = (expr);								\
+		if (!o) {								\
+			RTE_LOG(WARNING, PYTHON, "%s = %s: null
", # o, # expr);	\
+			goto err;							\
+		}									\
+	} while (0);

ERROR:SPACING: space required after that ';' (ctx:VxV)
#217: FILE: lib/librte_python/rte_python.c:65:
+#define CHKP(o, expr) do {CHK(o, expr); DBG(o);} while (0);
                                               ^

WARNING:DO_WHILE_MACRO_WITH_TRAILING_SEMICOLON: do {} while (0) macros should not be semicolon terminated
#217: FILE: lib/librte_python/rte_python.c:65:
+#define CHKP(o, expr) do {CHK(o, expr); DBG(o);} while (0);

WARNING:SPACE_BEFORE_TAB: please, no space before tabs
#219: FILE: lib/librte_python/rte_python.c:67:
+#define CHKZ(o, expr) ^I^I^I^I^I^I^I^I^I\$

WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#219: FILE: lib/librte_python/rte_python.c:67:
+#define CHKZ(o, expr) 									\
+	do {										\
+		o = (expr);								\
+		if (o) {								\
+			RTE_LOG(WARNING, PYTHON, "%s = %s: not null
", # o, # expr);	\
+			goto err;							\
+		}									\
+	} while (0);

WARNING:DO_WHILE_MACRO_WITH_TRAILING_SEMICOLON: do {} while (0) macros should not be semicolon terminated
#219: FILE: lib/librte_python/rte_python.c:67:
+#define CHKZ(o, expr) 									\
+	do {										\
+		o = (expr);								\
+		if (o) {								\
+			RTE_LOG(WARNING, PYTHON, "%s = %s: not null
", # o, # expr);	\
+			goto err;							\
+		}									\
+	} while (0);

ERROR:GLOBAL_INITIALISERS: do not initialise globals to 0
#240: FILE: lib/librte_python/rte_python.c:88:
+int rte_python_debug = 0;

ERROR:SPACING: space required before the open parenthesis '('
#266: FILE: lib/librte_python/rte_python.c:114:
+	while(size) {

ERROR:SPACING: space required before the open parenthesis '('
#389: FILE: lib/librte_python/rte_python.c:237:
+	if(!(mbuf = rte_mbuf_raw_alloc(pool))) {

ERROR:ASSIGN_IN_IF: do not use assignment in if condition
#389: FILE: lib/librte_python/rte_python.c:237:
+	if(!(mbuf = rte_mbuf_raw_alloc(pool))) {

ERROR:ASSIGN_IN_IF: do not use assignment in if condition
#435: FILE: lib/librte_python/rte_python.c:283:
+	if ((mbufs = rte_malloc_socket(NULL, sizeof(void *) * size,

ERROR:TRAILING_WHITESPACE: trailing whitespace
#643: FILE: mk/rte.app.mk:104:
+_LDLIBS-$(CONFIG_RTE_LIBRTE_PYTHON)         += -lrte_python -l$(CONFIG_RTE_LIBRTE_PYTHON_VERSION) $

ERROR:MISSING_SIGN_OFF: Missing Signed-off-by: line(s)

total: 9 errors, 7 warnings, 564 lines checked


More information about the test-report mailing list