automatic DPDK test reports
 help / color / mirror / Atom feed
From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: Alex Vesker <valex@nvidia.com>
Subject: |WARNING| pw118205 [v3 02/18] net/mlx5: split flow item matcher and value translation
Date: Fri, 14 Oct 2022 13:50:02 +0200 (CEST)	[thread overview]
Message-ID: <20221014115002.DF0AF120778@dpdk.org> (raw)
In-Reply-To: <20221014114833.13389-3-valex@nvidia.com>

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

_coding style issues_


CHECK:MACRO_ARG_REUSE: Macro argument reuse 'item' - possible side-effects?
#184: 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?
#184: 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?
#189: 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?
#189: 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?
#189: 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?
#189: 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?
#189: 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, 3609 lines checked

           reply	other threads:[~2022-10-14 11:50 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20221014114833.13389-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=20221014115002.DF0AF120778@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).