* [PATCH] IB/core: Remove redundant pointer mm
@ 2021-12-04 23:49 Colin Ian King
2021-12-06 23:54 ` Jason Gunthorpe
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2021-12-04 23:49 UTC (permalink / raw)
To: Jason Gunthorpe, linux-rdma; +Cc: kernel-janitors, linux-kernel
The pointer mm is assigned a value but it is never used. The pointer
is redundant and can be removed.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/infiniband/core/umem_odp.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/infiniband/core/umem_odp.c b/drivers/infiniband/core/umem_odp.c
index 7a47343d11f9..aead24c1a682 100644
--- a/drivers/infiniband/core/umem_odp.c
+++ b/drivers/infiniband/core/umem_odp.c
@@ -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;
--
2.33.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] IB/core: Remove redundant pointer mm
2021-12-04 23:49 [PATCH] IB/core: Remove redundant pointer mm Colin Ian King
@ 2021-12-06 23:54 ` Jason Gunthorpe
0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2021-12-06 23:54 UTC (permalink / raw)
To: Colin Ian King; +Cc: linux-rdma, kernel-janitors, linux-kernel
On Sat, Dec 04, 2021 at 11:49:04PM +0000, Colin Ian King wrote:
> The pointer mm is assigned a value but it is never used. The pointer
> is redundant and can be removed.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> drivers/infiniband/core/umem_odp.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-06 23:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-04 23:49 [PATCH] IB/core: Remove redundant pointer mm Colin Ian King
2021-12-06 23:54 ` Jason Gunthorpe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.