From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: Alex Vesker <valex@nvidia.com>
Subject: |WARNING| pw116666 [v1 02/19] net/mlx5: split flow item matcher and value translation
Date: Thu, 22 Sep 2022 21:05:45 +0200 (CEST) [thread overview]
Message-ID: <20220922190545.7B1C5121F02@dpdk.org> (raw)
In-Reply-To: <20220922190345.394-3-valex@nvidia.com>
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/116666
_coding style issues_
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'item' - possible side-effects?
#183: FILE: drivers/net/mlx5/mlx5_flow_dv.c:66:
+#define MLX5_ITEM_VALID(item, key_type) \
+ (((MLX5_SET_MATCHER_SW & (key_type)) && !((item)->spec)) || \
+ ((MLX5_SET_MATCHER_HS_V == (key_type)) && !((item)->spec)) || \
+ ((MLX5_SET_MATCHER_HS_M == (key_type)) && !((item)->mask)))
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'key_type' - possible side-effects?
#183: FILE: drivers/net/mlx5/mlx5_flow_dv.c:66:
+#define MLX5_ITEM_VALID(item, key_type) \
+ (((MLX5_SET_MATCHER_SW & (key_type)) && !((item)->spec)) || \
+ ((MLX5_SET_MATCHER_HS_V == (key_type)) && !((item)->spec)) || \
+ ((MLX5_SET_MATCHER_HS_M == (key_type)) && !((item)->mask)))
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'item' - possible side-effects?
#188: FILE: drivers/net/mlx5/mlx5_flow_dv.c:71:
+#define MLX5_ITEM_UPDATE(item, key_type, v, m, gm) \
+ do { \
+ if ((key_type) == MLX5_SET_MATCHER_SW_V) { \
+ v = (item)->spec; \
+ m = (item)->mask ? (item)->mask : (gm); \
+ } else if ((key_type) == MLX5_SET_MATCHER_HS_V) { \
+ v = (item)->spec; \
+ m = (v); \
+ } else { \
+ v = (item)->mask ? (item)->mask : (gm); \
+ m = (v); \
+ } \
+ } while (0)
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'key_type' - possible side-effects?
#188: FILE: drivers/net/mlx5/mlx5_flow_dv.c:71:
+#define MLX5_ITEM_UPDATE(item, key_type, v, m, gm) \
+ do { \
+ if ((key_type) == MLX5_SET_MATCHER_SW_V) { \
+ v = (item)->spec; \
+ m = (item)->mask ? (item)->mask : (gm); \
+ } else if ((key_type) == MLX5_SET_MATCHER_HS_V) { \
+ v = (item)->spec; \
+ m = (v); \
+ } else { \
+ v = (item)->mask ? (item)->mask : (gm); \
+ m = (v); \
+ } \
+ } while (0)
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'v' - possible side-effects?
#188: FILE: drivers/net/mlx5/mlx5_flow_dv.c:71:
+#define MLX5_ITEM_UPDATE(item, key_type, v, m, gm) \
+ do { \
+ if ((key_type) == MLX5_SET_MATCHER_SW_V) { \
+ v = (item)->spec; \
+ m = (item)->mask ? (item)->mask : (gm); \
+ } else if ((key_type) == MLX5_SET_MATCHER_HS_V) { \
+ v = (item)->spec; \
+ m = (v); \
+ } else { \
+ v = (item)->mask ? (item)->mask : (gm); \
+ m = (v); \
+ } \
+ } while (0)
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'm' - possible side-effects?
#188: FILE: drivers/net/mlx5/mlx5_flow_dv.c:71:
+#define MLX5_ITEM_UPDATE(item, key_type, v, m, gm) \
+ do { \
+ if ((key_type) == MLX5_SET_MATCHER_SW_V) { \
+ v = (item)->spec; \
+ m = (item)->mask ? (item)->mask : (gm); \
+ } else if ((key_type) == MLX5_SET_MATCHER_HS_V) { \
+ v = (item)->spec; \
+ m = (v); \
+ } else { \
+ v = (item)->mask ? (item)->mask : (gm); \
+ m = (v); \
+ } \
+ } while (0)
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'gm' - possible side-effects?
#188: FILE: drivers/net/mlx5/mlx5_flow_dv.c:71:
+#define MLX5_ITEM_UPDATE(item, key_type, v, m, gm) \
+ do { \
+ if ((key_type) == MLX5_SET_MATCHER_SW_V) { \
+ v = (item)->spec; \
+ m = (item)->mask ? (item)->mask : (gm); \
+ } else if ((key_type) == MLX5_SET_MATCHER_HS_V) { \
+ v = (item)->spec; \
+ m = (v); \
+ } else { \
+ v = (item)->mask ? (item)->mask : (gm); \
+ m = (v); \
+ } \
+ } while (0)
total: 0 errors, 0 warnings, 7 checks, 3615 lines checked
parent reply other threads:[~2022-09-22 19:05 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20220922190345.394-3-valex@nvidia.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=20220922190545.7B1C5121F02@dpdk.org \
--to=checkpatch@dpdk.org \
--cc=test-report@dpdk.org \
--cc=valex@nvidia.com \
/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).