* [PATCH] IB/mlx5: Remove dead code from alloc_cached_mr()
@ 2015-07-27 21:43 Roland Dreier
[not found] ` <DB4PR05MB4488F2A60FCD345F59A9542C58E0@DB4PR05MB448.eurprd05.prod.outlook.com>
[not found] ` <1438033403-13129-1-git-send-email-roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
0 siblings, 2 replies; 3+ messages in thread
From: Roland Dreier @ 2015-07-27 21:43 UTC (permalink / raw)
To: Doug Ledford, Eli Cohen; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
From: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
The only place that assigns mr inside the loop already does a break.
So "if (mr)" will never be true here since the function initializes mr
to NULL at the top. We can just drop the extra if and break here.
Signed-off-by: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
---
drivers/infiniband/hw/mlx5/mr.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
index bc9a0de897cb..10d2b213a4d8 100644
--- a/drivers/infiniband/hw/mlx5/mr.c
+++ b/drivers/infiniband/hw/mlx5/mr.c
@@ -441,9 +441,6 @@ static struct mlx5_ib_mr *alloc_cached_mr(struct mlx5_ib_dev *dev, int order)
spin_unlock_irq(&ent->lock);
queue_work(cache->wq, &ent->work);
-
- if (mr)
- break;
}
if (!mr)
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] IB/mlx5: Remove dead code from alloc_cached_mr()
[not found] ` <DB4PR05MB4488F2A60FCD345F59A9542C58E0-xsq7jzH2t6kaHWsdJSteB2u6+pknBqLbXA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
@ 2015-07-27 22:22 ` Eli Cohen
0 siblings, 0 replies; 3+ messages in thread
From: Eli Cohen @ 2015-07-27 22:22 UTC (permalink / raw)
To: roland-BHEL68pLQRGGvPXPguhicg, dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: Linux RDMA list
Acked-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>
> From: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
>
> The only place that assigns mr inside the loop already does a break.
> So "if (mr)" will never be true here since the function initializes mr to NULL at the top. We can just drop the extra if and break here.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] IB/mlx5: Remove dead code from alloc_cached_mr()
[not found] ` <1438033403-13129-1-git-send-email-roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2015-07-28 14:47 ` Doug Ledford
0 siblings, 0 replies; 3+ messages in thread
From: Doug Ledford @ 2015-07-28 14:47 UTC (permalink / raw)
To: Roland Dreier, Eli Cohen; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]
On 07/27/2015 05:43 PM, Roland Dreier wrote:
> From: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
>
> The only place that assigns mr inside the loop already does a break.
> So "if (mr)" will never be true here since the function initializes mr
> to NULL at the top. We can just drop the extra if and break here.
>
> Signed-off-by: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
> ---
> drivers/infiniband/hw/mlx5/mr.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
> index bc9a0de897cb..10d2b213a4d8 100644
> --- a/drivers/infiniband/hw/mlx5/mr.c
> +++ b/drivers/infiniband/hw/mlx5/mr.c
> @@ -441,9 +441,6 @@ static struct mlx5_ib_mr *alloc_cached_mr(struct mlx5_ib_dev *dev, int order)
> spin_unlock_irq(&ent->lock);
>
> queue_work(cache->wq, &ent->work);
> -
> - if (mr)
> - break;
> }
>
> if (!mr)
>
Thanks Roland. Picking this up for 4.3 today.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: 0E572FDD
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-28 14:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-27 21:43 [PATCH] IB/mlx5: Remove dead code from alloc_cached_mr() Roland Dreier
[not found] ` <DB4PR05MB4488F2A60FCD345F59A9542C58E0@DB4PR05MB448.eurprd05.prod.outlook.com>
[not found] ` <DB4PR05MB4488F2A60FCD345F59A9542C58E0-xsq7jzH2t6kaHWsdJSteB2u6+pknBqLbXA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2015-07-27 22:22 ` Eli Cohen
[not found] ` <1438033403-13129-1-git-send-email-roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-07-28 14:47 ` Doug Ledford
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.