Skip to content

Commit 4c90a60

Browse files
dtatuleamstsirkin
authored andcommitted
vdpa/mlx5: Drop redundant code
Originally, the second loop initialized the CVQ. But (acde392 ("vdpa/mlx5: Use consistent RQT size") initialized all the queues in the first loop, so the second iteration in init_mvqs() is never called because the first one will iterate up to max_vqs. Reviewed-by: Cosmin Ratiu <[email protected]> Acked-by: Eugenio Pérez <[email protected]> Signed-off-by: Dragos Tatulea <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 63f0cba commit 4c90a60

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

drivers/vdpa/mlx5/net/mlx5_vnet.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3519,12 +3519,6 @@ static void init_mvqs(struct mlx5_vdpa_net *ndev)
35193519
mvq->fwqp.fw = true;
35203520
mvq->fw_state = MLX5_VIRTIO_NET_Q_OBJECT_NONE;
35213521
}
3522-
for (; i < ndev->mvdev.max_vqs; i++) {
3523-
mvq = &ndev->vqs[i];
3524-
memset(mvq, 0, offsetof(struct mlx5_vdpa_virtqueue, ri));
3525-
mvq->index = i;
3526-
mvq->ndev = ndev;
3527-
}
35283522
}
35293523

35303524
struct mlx5_vdpa_mgmtdev {

0 commit comments

Comments
 (0)