[08/13] net/mlx5/hws: fix code analysis error in passing 0 enum val

Message ID 20240314114220.203241-8-igozlan@nvidia.com (mailing list archive)
State New
Delegated to: Raslan Darawsheh
Headers
Series [01/13] net/mlx5/hws: move warn into debug level when needed |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Itamar Gozlan March 14, 2024, 11:42 a.m. UTC
  From: Yevgeny Kliteynik <kliteyn@nvidia.com>

Instead of passing 0 as an enum parameter, define flag NONE.
This resolves the following code analysis error: "enumerated
type mixed with another type".
This value is currently used in tests only, and will later
be used in backward-compatible steering API.

Fixes: 5cadd74fbc08 ("net/mlx5: add HW steering low-level abstract stub")
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr.h | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/drivers/net/mlx5/hws/mlx5dr.h b/drivers/net/mlx5/hws/mlx5dr.h
index 80e118a980..d2c426e679 100644
--- a/drivers/net/mlx5/hws/mlx5dr.h
+++ b/drivers/net/mlx5/hws/mlx5dr.h
@@ -82,6 +82,7 @@  enum mlx5dr_action_aso_ct_flags {
 };
 
 enum mlx5dr_match_template_flags {
+	MLX5DR_MATCH_TEMPLATE_FLAG_NONE = 0,
 	/* Allow relaxed matching by skipping derived dependent match fields. */
 	MLX5DR_MATCH_TEMPLATE_FLAG_RELAXED_MATCH = 1,
 };