|WARNING| pw150274 [PATCH v5 15/25] net/ice: move Tx queue mbuf cleanup fn to common

checkpatch at dpdk.org checkpatch at dpdk.org
Mon Jan 20 13:04:26 CET 2025


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

_coding style issues_


CHECK:MACRO_ARG_REUSE: Macro argument reuse 'txq' - possible side-effects?
#116: FILE: drivers/net/intel/common/tx.h:274:
+#define IETH_FREE_BUFS_LOOP(txq, swr, start) do { \
+		uint16_t i = start; \
+		if (txq->tx_tail < i) { \
+			for (; i < txq->nb_tx_desc; i++) { \
+				rte_pktmbuf_free_seg(swr[i].mbuf); \
+				swr[i].mbuf = NULL; \
+			} \
+			i = 0; \
+		} \
+		for (; i < txq->tx_tail; i++) { \
+			rte_pktmbuf_free_seg(swr[i].mbuf); \
+			swr[i].mbuf = NULL; \
+		} \
+} while (0)

CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'txq' may be better as '(txq)' to avoid precedence issues
#116: FILE: drivers/net/intel/common/tx.h:274:
+#define IETH_FREE_BUFS_LOOP(txq, swr, start) do { \
+		uint16_t i = start; \
+		if (txq->tx_tail < i) { \
+			for (; i < txq->nb_tx_desc; i++) { \
+				rte_pktmbuf_free_seg(swr[i].mbuf); \
+				swr[i].mbuf = NULL; \
+			} \
+			i = 0; \
+		} \
+		for (; i < txq->tx_tail; i++) { \
+			rte_pktmbuf_free_seg(swr[i].mbuf); \
+			swr[i].mbuf = NULL; \
+		} \
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'swr' - possible side-effects?
#116: FILE: drivers/net/intel/common/tx.h:274:
+#define IETH_FREE_BUFS_LOOP(txq, swr, start) do { \
+		uint16_t i = start; \
+		if (txq->tx_tail < i) { \
+			for (; i < txq->nb_tx_desc; i++) { \
+				rte_pktmbuf_free_seg(swr[i].mbuf); \
+				swr[i].mbuf = NULL; \
+			} \
+			i = 0; \
+		} \
+		for (; i < txq->tx_tail; i++) { \
+			rte_pktmbuf_free_seg(swr[i].mbuf); \
+			swr[i].mbuf = NULL; \
+		} \
+} while (0)

total: 0 errors, 0 warnings, 3 checks, 250 lines checked


More information about the test-report mailing list