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

Itamar Gozlan igozlan at nvidia.com
Thu Mar 14 12:42:13 CET 2024


From: Yevgeny Kliteynik <kliteyn at nvidia.com>

Small simplification to the send_queues_close code

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

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)
-- 
2.39.3



More information about the dev mailing list