* [dpdk-test-report] |WARNING| pw40927 [PATCH 2/7] net/cxgbe: parse and validate flows
[not found] <6f9b34d75940a654ee79b96918e127212d9f5239.1528469677.git.rahul.lakkireddy@chelsio.com>
@ 2018-06-08 18:00 ` checkpatch
0 siblings, 0 replies; only message in thread
From: checkpatch @ 2018-06-08 18:00 UTC (permalink / raw)
To: test-report; +Cc: Rahul Lakkireddy
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/40927
_coding style issues_
WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#172: FILE: drivers/net/cxgbe/cxgbe_filter.c:1:
+/* SPDX-License-Identifier: BSD-3-Clause
CHECK:MACRO_ARG_REUSE: Macro argument reuse '_field' - possible side-effects?
#194: FILE: drivers/net/cxgbe/cxgbe_filter.c:23:
+#define S(_field) \
+ (fs->val._field || fs->mask._field)
CHECK:MACRO_ARG_PRECEDENCE: Macro argument '_field' may be better as '(_field)' to avoid precedence issues
#194: FILE: drivers/net/cxgbe/cxgbe_filter.c:23:
+#define S(_field) \
+ (fs->val._field || fs->mask._field)
WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#372: FILE: drivers/net/cxgbe/cxgbe_flow.c:1:
+/* SPDX-License-Identifier: BSD-3-Clause
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fs' - possible side-effects?
#379: FILE: drivers/net/cxgbe/cxgbe_flow.c:8:
+#define __CXGBE_FILL_FS(__v, __m, fs, elem, e) \
+do { \
+ if (!((fs)->val.elem || (fs)->mask.elem)) { \
+ (fs)->val.elem = (__v); \
+ (fs)->mask.elem = (__m); \
+ } else { \
+ return rte_flow_error_set(e, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, \
+ NULL, "a filter can be specified" \
+ " only once"); \
+ } \
+} while (0)
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'elem' - possible side-effects?
#379: FILE: drivers/net/cxgbe/cxgbe_flow.c:8:
+#define __CXGBE_FILL_FS(__v, __m, fs, elem, e) \
+do { \
+ if (!((fs)->val.elem || (fs)->mask.elem)) { \
+ (fs)->val.elem = (__v); \
+ (fs)->mask.elem = (__m); \
+ } else { \
+ return rte_flow_error_set(e, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, \
+ NULL, "a filter can be specified" \
+ " only once"); \
+ } \
+} while (0)
CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'elem' may be better as '(elem)' to avoid precedence issues
#379: FILE: drivers/net/cxgbe/cxgbe_flow.c:8:
+#define __CXGBE_FILL_FS(__v, __m, fs, elem, e) \
+do { \
+ if (!((fs)->val.elem || (fs)->mask.elem)) { \
+ (fs)->val.elem = (__v); \
+ (fs)->mask.elem = (__m); \
+ } else { \
+ return rte_flow_error_set(e, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, \
+ NULL, "a filter can be specified" \
+ " only once"); \
+ } \
+} while (0)
WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#379: FILE: drivers/net/cxgbe/cxgbe_flow.c:8:
+#define __CXGBE_FILL_FS(__v, __m, fs, elem, e) \
+do { \
+ if (!((fs)->val.elem || (fs)->mask.elem)) { \
+ (fs)->val.elem = (__v); \
+ (fs)->mask.elem = (__m); \
+ } else { \
+ return rte_flow_error_set(e, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, \
+ NULL, "a filter can be specified" \
+ " only once"); \
+ } \
+} while (0)
CHECK:MACRO_ARG_REUSE: Macro argument reuse '__v' - possible side-effects?
#391: FILE: drivers/net/cxgbe/cxgbe_flow.c:20:
+#define __CXGBE_FILL_FS_MEMCPY(__v, __m, fs, elem) \
+do { \
+ memcpy(&(fs)->val.elem, &(__v), sizeof(__v)); \
+ memcpy(&(fs)->mask.elem, &(__m), sizeof(__m)); \
+} while (0)
CHECK:MACRO_ARG_REUSE: Macro argument reuse '__m' - possible side-effects?
#391: FILE: drivers/net/cxgbe/cxgbe_flow.c:20:
+#define __CXGBE_FILL_FS_MEMCPY(__v, __m, fs, elem) \
+do { \
+ memcpy(&(fs)->val.elem, &(__v), sizeof(__v)); \
+ memcpy(&(fs)->mask.elem, &(__m), sizeof(__m)); \
+} while (0)
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fs' - possible side-effects?
#391: FILE: drivers/net/cxgbe/cxgbe_flow.c:20:
+#define __CXGBE_FILL_FS_MEMCPY(__v, __m, fs, elem) \
+do { \
+ memcpy(&(fs)->val.elem, &(__v), sizeof(__v)); \
+ memcpy(&(fs)->mask.elem, &(__m), sizeof(__m)); \
+} while (0)
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'elem' - possible side-effects?
#391: FILE: drivers/net/cxgbe/cxgbe_flow.c:20:
+#define __CXGBE_FILL_FS_MEMCPY(__v, __m, fs, elem) \
+do { \
+ memcpy(&(fs)->val.elem, &(__v), sizeof(__v)); \
+ memcpy(&(fs)->mask.elem, &(__m), sizeof(__m)); \
+} while (0)
CHECK:CAMELCASE: Avoid CamelCase: <ETHER_TYPE_IPv4>
#492: FILE: drivers/net/cxgbe/cxgbe_flow.c:121:
+ CXGBE_FILL_FS(ETHER_TYPE_IPv4, 0xffff, ethtype);
CHECK:CAMELCASE: Avoid CamelCase: <ETHER_TYPE_IPv6>
#521: FILE: drivers/net/cxgbe/cxgbe_flow.c:150:
+ CXGBE_FILL_FS(ETHER_TYPE_IPv6, 0xffff, ethtype);
total: 0 errors, 3 warnings, 11 checks, 781 lines checked
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-06-08 18:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <6f9b34d75940a654ee79b96918e127212d9f5239.1528469677.git.rahul.lakkireddy@chelsio.com>
2018-06-08 18:00 ` [dpdk-test-report] |WARNING| pw40927 [PATCH 2/7] net/cxgbe: parse and validate flows 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).