From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: David Harton <dharton@cisco.com>
Subject: [dpdk-test-report] |WARNING| pw65131 [PATCH v2] net/e1000: update UPDATE_VF_STAT to handle rollover
Date: Sun, 26 Jan 2020 18:26:34 +0100 (CET) [thread overview]
Message-ID: <20200126172634.CBAEB4C7A@dpdk.org> (raw)
In-Reply-To: <20200126172548.23327-1-dharton@cisco.com>
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/65131
_coding style issues_
ERROR:BAD_SIGN_OFF: Unrecognized email address: 'intel.com'
#69:
Cc: intel.com
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'last' - possible side-effects?
#89: 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
#89: 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?
#89: 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
#89: 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: 1 errors, 0 warnings, 4 checks, 20 lines checked
parent reply other threads:[~2020-01-26 17:26 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20200126172548.23327-1-dharton@cisco.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200126172634.CBAEB4C7A@dpdk.org \
--to=checkpatch@dpdk.org \
--cc=dharton@cisco.com \
--cc=test-report@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).