|WARNING| pw116510 [PATCH v4 3/7] ethdev: get meter profile/policy objects

checkpatch at dpdk.org checkpatch at dpdk.org
Wed Sep 21 04:13:06 CEST 2022


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

_coding style issues_


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

total: 0 errors, 1 warnings, 191 lines checked


More information about the test-report mailing list