RDMA/mlx5: remove variable i
authorColin Ian King <colin.i.king@gmail.com>
Mon, 24 Oct 2022 13:37:56 +0000 (14:37 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 28 Dec 2022 10:28:09 +0000 (05:28 -0500)
Variable i is just being incremented and it's never used
anywhere else. The variable and the increment are redundant so
remove it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Message-Id: <20221024133756.2158497-1-colin.i.king@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/mlx5/core/mr.c

index a4d7ee2339fa5b305053712c59008d7ddf62d2f4..0a1e0b0dc37e3d2264fa9d2b4713463a95afb833 100644 (file)
@@ -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;