[PATCH] RDMA/mlx4: remove redundant assignment to variable nreq

Colin Ian King posted 1 patch 4 years, 5 months ago
drivers/infiniband/hw/mlx4/srq.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] RDMA/mlx4: remove redundant assignment to variable nreq
Posted by Colin Ian King 4 years, 5 months ago
Variable nreq is being assigned a value that is never read. The
assignment is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/infiniband/hw/mlx4/srq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/infiniband/hw/mlx4/srq.c b/drivers/infiniband/hw/mlx4/srq.c
index 6a381751c0d8..c4cf91235eee 100644
--- a/drivers/infiniband/hw/mlx4/srq.c
+++ b/drivers/infiniband/hw/mlx4/srq.c
@@ -320,7 +320,6 @@ int mlx4_ib_post_srq_recv(struct ib_srq *ibsrq, const struct ib_recv_wr *wr,
 	if (mdev->dev->persist->state & MLX4_DEVICE_STATE_INTERNAL_ERROR) {
 		err = -EIO;
 		*bad_wr = wr;
-		nreq = 0;
 		goto out;
 	}
 
-- 
2.34.1

Re: [PATCH] RDMA/mlx4: remove redundant assignment to variable nreq
Posted by Jason Gunthorpe 4 years, 4 months ago
On Sun, Jan 30, 2022 at 10:57:47PM +0000, Colin Ian King wrote:
> Variable nreq is being assigned a value that is never read. The
> assignment is redundant and can be removed.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  drivers/infiniband/hw/mlx4/srq.c | 1 -
>  1 file changed, 1 deletion(-)

Applied to for-next, thanks

Jason