automatic DPDK test reports
 help / color / mirror / Atom feed
* [dpdk-test-report] |WARNING| pw87066 [PATCH v1 08/20] net/txgbe: add VF device stats and xstats get operation
       [not found] <20210122094800.197748-9-jiawenwu@trustnetic.com>
@ 2021-01-22  9:50 ` checkpatch
  0 siblings, 0 replies; only message in thread
From: checkpatch @ 2021-01-22  9:50 UTC (permalink / raw)
  To: test-report; +Cc: Jiawen Wu

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

_coding style issues_


CHECK:MACRO_ARG_REUSE: Macro argument reuse 'last' - possible side-effects?
#94: FILE: drivers/net/txgbe/base/txgbe_regs.h:1704:
+#define TXGBE_UPDCNT32(reg, last, cur)                           \
+do {                                                             \
+	uint32_t latest = rd32(hw, reg);                         \
+	if (hw->offset_loaded || hw->rx_loaded)			 \
+		last = 0;					 \
+	cur += (latest - last) & UINT_MAX;                       \
+	last = latest;                                           \
+} while (0)

CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'cur' may be better as '(cur)' to avoid precedence issues
#94: FILE: drivers/net/txgbe/base/txgbe_regs.h:1704:
+#define TXGBE_UPDCNT32(reg, last, cur)                           \
+do {                                                             \
+	uint32_t latest = rd32(hw, reg);                         \
+	if (hw->offset_loaded || hw->rx_loaded)			 \
+		last = 0;					 \
+	cur += (latest - last) & UINT_MAX;                       \
+	last = latest;                                           \
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'regl' - possible side-effects?
#103: FILE: drivers/net/txgbe/base/txgbe_regs.h:1713:
+#define TXGBE_UPDCNT36(regl, last, cur)                          \
+do {                                                             \
+	uint64_t new_lsb = rd32(hw, regl);                       \
+	uint64_t new_msb = rd32(hw, regl + 4);                   \
+	uint64_t latest = ((new_msb << 32) | new_lsb);           \
+	if (hw->offset_loaded || hw->rx_loaded)			 \
+		last = 0;					 \
+	cur += (0x1000000000LL + latest - last) & 0xFFFFFFFFFLL; \
+	last = latest;                                           \
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'last' - possible side-effects?
#103: FILE: drivers/net/txgbe/base/txgbe_regs.h:1713:
+#define TXGBE_UPDCNT36(regl, last, cur)                          \
+do {                                                             \
+	uint64_t new_lsb = rd32(hw, regl);                       \
+	uint64_t new_msb = rd32(hw, regl + 4);                   \
+	uint64_t latest = ((new_msb << 32) | new_lsb);           \
+	if (hw->offset_loaded || hw->rx_loaded)			 \
+		last = 0;					 \
+	cur += (0x1000000000LL + latest - last) & 0xFFFFFFFFFLL; \
+	last = latest;                                           \
+} while (0)

CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'cur' may be better as '(cur)' to avoid precedence issues
#103: FILE: drivers/net/txgbe/base/txgbe_regs.h:1713:
+#define TXGBE_UPDCNT36(regl, last, cur)                          \
+do {                                                             \
+	uint64_t new_lsb = rd32(hw, regl);                       \
+	uint64_t new_msb = rd32(hw, regl + 4);                   \
+	uint64_t latest = ((new_msb << 32) | new_lsb);           \
+	if (hw->offset_loaded || hw->rx_loaded)			 \
+		last = 0;					 \
+	cur += (0x1000000000LL + latest - last) & 0xFFFFFFFFFLL; \
+	last = latest;                                           \
+} while (0)

total: 0 errors, 0 warnings, 5 checks, 264 lines checked

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-22  9:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210122094800.197748-9-jiawenwu@trustnetic.com>
2021-01-22  9:50 ` [dpdk-test-report] |WARNING| pw87066 [PATCH v1 08/20] net/txgbe: add VF device stats and xstats get operation checkpatch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).