Skip to contentSkip to conversation

RDMA/mlx5: remove variable i

PATCH New Colin Ian King 1 participant 1 message Oct 24, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/mlx5: remove variable i

Variable i is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it.

---
 drivers/vdpa/mlx5/core/mr.c | 2 --
 1 file changed, 2 deletions(-)
drivers/vdpa/mlx5/core/mr.c +0 -2
index a639b9208d41..60e0f51d9c92 100644
@@ -311,7 +311,6 @@ static int add_direct_chain(struct mlx5_vdpa_dev *mvdev, u64 start, u64 size, u8
 	u64 st;
 	u64 sz;
 	int err;
-	int i = 0;
 
 	st = start;
 	while (size) {
@@ -336,7 +335,6 @@ static int add_direct_chain(struct mlx5_vdpa_dev *mvdev, u64 start, u64 size, u8
 		mr->num_directs++;
 		mr->num_klms++;
 		st += sz;
-		i++;
 	}
 	list_splice_tail(&tmp, &mr->head);
 	return 0;
Signature · 1 line
2.37.3