Skip to contentSkip to conversation

IB/core: Remove redundant pointer mm

PATCH Applied Colin Ian King 2 participants 2 messages Dec 4, 2021 – Dec 6, 2021

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

PATCH 1/1 IB/core: Remove redundant pointer mm

The pointer mm is assigned a value but it is never used. The pointer is redundant and can be removed.

---
 drivers/infiniband/core/umem_odp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/infiniband/core/umem_odp.c +1 -2
index 7a47343d11f9..aead24c1a682 100644
@@ -227,7 +227,6 @@ struct ib_umem_odp *ib_umem_odp_get(struct ib_device *device,
 				    const struct mmu_interval_notifier_ops *ops)
 {
 	struct ib_umem_odp *umem_odp;
-	struct mm_struct *mm;
 	int ret;
 
 	if (WARN_ON_ONCE(!(access & IB_ACCESS_ON_DEMAND)))
@@ -241,7 +240,7 @@ struct ib_umem_odp *ib_umem_odp_get(struct ib_device *device,
 	umem_odp->umem.length = size;
 	umem_odp->umem.address = addr;
 	umem_odp->umem.writable = ib_access_writable(access);
-	umem_odp->umem.owning_mm = mm = current->mm;
+	umem_odp->umem.owning_mm = current->mm;
 	umem_odp->notifier.ops = ops;
 
 	umem_odp->page_shift = PAGE_SHIFT;
Signature · 1 line
2.33.1
maintainer Applied
#1 lore raw
Quoted 7 lines · Colin Ian King

The pointer mm is assigned a value but it is never used. The pointer is redundant and can be removed.

---
 drivers/infiniband/core/umem_odp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied to for-next, thanks

Jason