[dpdk-test-report] |WARNING| pw24882 [PATCH RFC 2/3] ethdev: add new rte_mtr API for traffic metering and policing

checkpatch at dpdk.org checkpatch at dpdk.org
Tue May 30 18:47:32 CEST 2017


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

_coding style issues_


WARNING:ENOSYS: ENOSYS means 'invalid syscall nr' and nothing else
#161: FILE: lib/librte_ether/rte_mtr.c:61:
+			ENOSYS,

WARNING:ENOSYS: ENOSYS means 'invalid syscall nr' and nothing else
#164: FILE: lib/librte_ether/rte_mtr.c:64:
+			rte_strerror(ENOSYS));

WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#171: FILE: lib/librte_ether/rte_mtr.c:71:
+#define RTE_MTR_FUNC(port_id, func)			\
+({							\
+	const struct rte_mtr_ops *ops =			\
+		rte_mtr_ops_get(port_id, error);		\
+	if (ops == NULL)					\
+		return -rte_errno;			\
+							\
+	if (ops->func == NULL)				\
+		return -rte_mtr_error_set(error,		\
+			ENOSYS,				\
+			RTE_MTR_ERROR_TYPE_UNSPECIFIED,	\
+			NULL,				\
+			rte_strerror(ENOSYS));		\
+							\
+	ops->func;					\
+})

WARNING:ENOSYS: ENOSYS means 'invalid syscall nr' and nothing else
#180: FILE: lib/librte_ether/rte_mtr.c:80:
+			ENOSYS,				\

WARNING:ENOSYS: ENOSYS means 'invalid syscall nr' and nothing else
#183: FILE: lib/librte_ether/rte_mtr.c:83:
+			rte_strerror(ENOSYS));		\

total: 0 errors, 5 warnings, 885 lines checked


More information about the test-report mailing list