[dpdk-test-report] |WARNING| pw98288 [PATCH 07/32] net/ngbe: support VLAN and QinQ offload

checkpatch at dpdk.org checkpatch at dpdk.org
Wed Sep 8 10:38:37 CEST 2021


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

_coding style issues_


CHECK:MACRO_ARG_REUSE: Macro argument reuse 'q' - possible side-effects?
#113: FILE: drivers/net/ngbe/ngbe_ethdev.c:33:
+#define NGBE_SET_HWSTRIP(h, q) do {\
+		uint32_t idx = (q) / (sizeof((h)->bitmap[0]) * NBBY); \
+		uint32_t bit = (q) % (sizeof((h)->bitmap[0]) * NBBY); \
+		(h)->bitmap[idx] |= 1 << bit;\
+	} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'q' - possible side-effects?
#119: FILE: drivers/net/ngbe/ngbe_ethdev.c:39:
+#define NGBE_CLEAR_HWSTRIP(h, q) do {\
+		uint32_t idx = (q) / (sizeof((h)->bitmap[0]) * NBBY); \
+		uint32_t bit = (q) % (sizeof((h)->bitmap[0]) * NBBY); \
+		(h)->bitmap[idx] &= ~(1 << bit);\
+	} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'q' - possible side-effects?
#125: FILE: drivers/net/ngbe/ngbe_ethdev.c:45:
+#define NGBE_GET_HWSTRIP(h, q, r) do {\
+		uint32_t idx = (q) / (sizeof((h)->bitmap[0]) * NBBY); \
+		uint32_t bit = (q) % (sizeof((h)->bitmap[0]) * NBBY); \
+		(r) = (h)->bitmap[idx] >> bit & 1;\
+	} while (0)

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


More information about the test-report mailing list