]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
RDMA/rxe: Remove redundant assignment to variable page_offset
authorColin Ian King <coking@nvidia.com>
Tue, 14 Oct 2025 12:03:43 +0000 (13:03 +0100)
committerLeon Romanovsky <leon@kernel.org>
Sun, 19 Oct 2025 12:06:21 +0000 (08:06 -0400)
The variable page_offset is being assigned a value at the start of
a loop and being redundantly zero'd at the end of the loop, there
is no code that reads the zero'd value. The assignment is redundant
and can be removed.

Signed-off-by: Colin Ian King <coking@nvidia.com>
Link: https://patch.msgid.link/20251014120343.2528608-1-coking@nvidia.com
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/sw/rxe/rxe_mr.c
drivers/infiniband/sw/rxe/rxe_odp.c

index bcb97b3ea58ac75822895fb06fc53854cb9a95f2..b1df05238848810f59c7fc186dc18dc816ac5e77 100644 (file)
@@ -452,7 +452,6 @@ static int rxe_mr_flush_pmem_iova(struct rxe_mr *mr, u64 iova, unsigned int leng
 
                length -= bytes;
                iova += bytes;
-               page_offset = 0;
        }
 
        return 0;
index f58e3ec6252f52d6fa62289997c78b5e18818e10..ae71812bea82c7084fa21a89aa0dee641c2a1f4f 100644 (file)
@@ -358,7 +358,6 @@ int rxe_odp_flush_pmem_iova(struct rxe_mr *mr, u64 iova,
 
                length -= bytes;
                iova += bytes;
-               page_offset = 0;
        }
 
        mutex_unlock(&umem_odp->umem_mutex);