[dpdk-test-report] |WARNING| pw93473 [RFC PATCH] ethdev: add support for testpmd-compliant flow rule dumping

checkpatch at dpdk.org checkpatch at dpdk.org
Thu May 27 10:26:27 CEST 2021


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

_coding style issues_


WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#233: FILE: lib/ethdev/rte_flow_snprint.c:77:
+#define SNPRINT(_type, _fmt) \
+	do {								\
+		const _type *vp = value_ptr;				\
+		size_t write_size_max;					\
+		int retv;						\
+									\
+		write_size_max = buf_size -				\
+				 RTE_MIN(buf_size, *nb_chars_total);	\
+		retv = snprintf(buf + *nb_chars_total, write_size_max,	\
+				_fmt, *vp);				\
+		if (retv < 0)						\
+			return -EFAULT;					\
+									\
+		*nb_chars_total += retv;				\
+									\
+		return 0;						\
+	} while (0)

total: 0 errors, 1 warnings, 1736 lines checked


More information about the test-report mailing list