[06/13] net/mlx5/hws: simplify send_queues_close code

Message ID 20240314114220.203241-6-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>

Small simplification to the send_queues_close code

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_send.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
  

Patch

diff --git a/drivers/net/mlx5/hws/mlx5dr_send.c b/drivers/net/mlx5/hws/mlx5dr_send.c
index d58fdb108f..d61862f074 100644
--- a/drivers/net/mlx5/hws/mlx5dr_send.c
+++ b/drivers/net/mlx5/hws/mlx5dr_send.c
@@ -970,13 +970,8 @@  int mlx5dr_send_queue_open(struct mlx5dr_context *ctx,
 
 static void __mlx5dr_send_queues_close(struct mlx5dr_context *ctx, uint16_t queues)
 {
-	struct mlx5dr_send_engine *queue;
-
-	while (queues--) {
-		queue = &ctx->send_queue[queues];
-
-		mlx5dr_send_queue_close(queue);
-	}
+	while (queues--)
+		mlx5dr_send_queue_close(&ctx->send_queue[queues]);
 }
 
 void mlx5dr_send_queues_close(struct mlx5dr_context *ctx)