automatic DPDK test reports
 help / color / mirror / Atom feed
* [dpdk-test-report] |WARNING| pw63734 [PATCH] net/e1000: update UPDATE_VF_STAT to handle rollover
       [not found] <20191211024802.17978-1-dharton@cisco.com>
@ 2019-12-11  2:49 ` checkpatch
  2019-12-11  6:54 ` [dpdk-test-report] |WARNING| pw63734 " 0-day Robot
  1 sibling, 0 replies; 2+ messages in thread
From: checkpatch @ 2019-12-11  2:49 UTC (permalink / raw)
  To: test-report; +Cc: David Harton

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

_coding style issues_


CHECK:MACRO_ARG_REUSE: Macro argument reuse 'last' - possible side-effects?
#83: FILE: drivers/net/e1000/igb_ethdev.c:264:
+#define UPDATE_VF_STAT(reg, last, cur)                          \
+{                                                               \
+	u32 latest = E1000_READ_REG(hw, reg);                   \
+	if (latest >= last)                                     \
+		cur += (latest - last);                         \
+	else                                                    \
+		cur += ((latest + ((uint64_t)1 << 32)) - last); \
+	cur &= UINT_MAX;                                        \
+	last = latest;                                          \
 }

CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'last' may be better as '(last)' to avoid precedence issues
#83: FILE: drivers/net/e1000/igb_ethdev.c:264:
+#define UPDATE_VF_STAT(reg, last, cur)                          \
+{                                                               \
+	u32 latest = E1000_READ_REG(hw, reg);                   \
+	if (latest >= last)                                     \
+		cur += (latest - last);                         \
+	else                                                    \
+		cur += ((latest + ((uint64_t)1 << 32)) - last); \
+	cur &= UINT_MAX;                                        \
+	last = latest;                                          \
 }

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'cur' - possible side-effects?
#83: FILE: drivers/net/e1000/igb_ethdev.c:264:
+#define UPDATE_VF_STAT(reg, last, cur)                          \
+{                                                               \
+	u32 latest = E1000_READ_REG(hw, reg);                   \
+	if (latest >= last)                                     \
+		cur += (latest - last);                         \
+	else                                                    \
+		cur += ((latest + ((uint64_t)1 << 32)) - last); \
+	cur &= UINT_MAX;                                        \
+	last = latest;                                          \
 }

CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'cur' may be better as '(cur)' to avoid precedence issues
#83: FILE: drivers/net/e1000/igb_ethdev.c:264:
+#define UPDATE_VF_STAT(reg, last, cur)                          \
+{                                                               \
+	u32 latest = E1000_READ_REG(hw, reg);                   \
+	if (latest >= last)                                     \
+		cur += (latest - last);                         \
+	else                                                    \
+		cur += ((latest + ((uint64_t)1 << 32)) - last); \
+	cur &= UINT_MAX;                                        \
+	last = latest;                                          \
 }

total: 0 errors, 0 warnings, 4 checks, 20 lines checked

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dpdk-test-report] |WARNING| pw63734 net/e1000: update UPDATE_VF_STAT to handle rollover
       [not found] <20191211024802.17978-1-dharton@cisco.com>
  2019-12-11  2:49 ` [dpdk-test-report] |WARNING| pw63734 [PATCH] net/e1000: update UPDATE_VF_STAT to handle rollover checkpatch
@ 2019-12-11  6:54 ` 0-day Robot
  1 sibling, 0 replies; 2+ messages in thread
From: 0-day Robot @ 2019-12-11  6:54 UTC (permalink / raw)
  To: test-report; +Cc: dharton, robot

From: robot@bytheb.org

Test-Label: travis-robot
Test-Status: WARNING
http://dpdk.org/patch/63734

_Travis build: failed_
Build URL: https://travis-ci.com/ovsrobot/dpdk/builds/140534234

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-11  6:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20191211024802.17978-1-dharton@cisco.com>
2019-12-11  2:49 ` [dpdk-test-report] |WARNING| pw63734 [PATCH] net/e1000: update UPDATE_VF_STAT to handle rollover checkpatch
2019-12-11  6:54 ` [dpdk-test-report] |WARNING| pw63734 " 0-day Robot

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).