All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] infiniband: hw: qedr: Remove Unneeded variable rc
@ 2019-07-16 17:37 Hariprasad Kelam
  2019-07-17  6:11 ` Michal Kalderon
  2019-07-25 16:57 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Hariprasad Kelam @ 2019-07-16 17:37 UTC (permalink / raw)
  To: Michal Kalderon, Ariel Elior, Doug Ledford, Jason Gunthorpe,
	linux-rdma, linux-kernel

fix below issue reported by coccicheck
drivers/infiniband/hw/qedr/verbs.c:2454:5-7: Unneeded variable: "rc".
Return "0" on line 2499

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
 drivers/infiniband/hw/qedr/verbs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index 27d90a84..0c6a4bc 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -2451,7 +2451,6 @@ int qedr_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata)
 	struct qedr_dev *dev = qp->dev;
 	struct ib_qp_attr attr;
 	int attr_mask = 0;
-	int rc = 0;
 
 	DP_DEBUG(dev, QEDR_MSG_QP, "destroy qp: destroying %p, qp type=%d\n",
 		 qp, qp->qp_type);
@@ -2496,7 +2495,7 @@ int qedr_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata)
 		xa_erase_irq(&dev->qps, qp->qp_id);
 		kfree(qp);
 	}
-	return rc;
+	return 0;
 }
 
 int qedr_create_ah(struct ib_ah *ibah, struct rdma_ah_attr *attr, u32 flags,
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] infiniband: hw: qedr: Remove Unneeded variable rc
  2019-07-16 17:37 [PATCH] infiniband: hw: qedr: Remove Unneeded variable rc Hariprasad Kelam
@ 2019-07-17  6:11 ` Michal Kalderon
  2019-07-25 16:57 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Michal Kalderon @ 2019-07-17  6:11 UTC (permalink / raw)
  To: Hariprasad Kelam, Ariel Elior, Doug Ledford, Jason Gunthorpe,
	linux-rdma, linux-kernel

> From: linux-rdma-owner@vger.kernel.org <linux-rdma-
> owner@vger.kernel.org> On Behalf Of Hariprasad Kelam
> 
> fix below issue reported by coccicheck
> drivers/infiniband/hw/qedr/verbs.c:2454:5-7: Unneeded variable: "rc".
> Return "0" on line 2499
> 
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> ---
>  drivers/infiniband/hw/qedr/verbs.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/qedr/verbs.c
> b/drivers/infiniband/hw/qedr/verbs.c
> index 27d90a84..0c6a4bc 100644
> --- a/drivers/infiniband/hw/qedr/verbs.c
> +++ b/drivers/infiniband/hw/qedr/verbs.c
> @@ -2451,7 +2451,6 @@ int qedr_destroy_qp(struct ib_qp *ibqp, struct
> ib_udata *udata)
>  	struct qedr_dev *dev = qp->dev;
>  	struct ib_qp_attr attr;
>  	int attr_mask = 0;
> -	int rc = 0;
> 
>  	DP_DEBUG(dev, QEDR_MSG_QP, "destroy qp: destroying %p, qp
> type=%d\n",
>  		 qp, qp->qp_type);
> @@ -2496,7 +2495,7 @@ int qedr_destroy_qp(struct ib_qp *ibqp, struct
> ib_udata *udata)
>  		xa_erase_irq(&dev->qps, qp->qp_id);
>  		kfree(qp);
>  	}
> -	return rc;
> +	return 0;
>  }
> 
>  int qedr_create_ah(struct ib_ah *ibah, struct rdma_ah_attr *attr, u32 flags,
> --
> 2.7.4

Thanks, 

Acked-by: Michal Kalderon <michal.kalderon@marvell.com>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] infiniband: hw: qedr: Remove Unneeded variable rc
  2019-07-16 17:37 [PATCH] infiniband: hw: qedr: Remove Unneeded variable rc Hariprasad Kelam
  2019-07-17  6:11 ` Michal Kalderon
@ 2019-07-25 16:57 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2019-07-25 16:57 UTC (permalink / raw)
  To: Hariprasad Kelam
  Cc: Michal Kalderon, Ariel Elior, Doug Ledford, linux-rdma, linux-kernel

On Tue, Jul 16, 2019 at 11:07:12PM +0530, Hariprasad Kelam wrote:
> fix below issue reported by coccicheck
> drivers/infiniband/hw/qedr/verbs.c:2454:5-7: Unneeded variable: "rc".
> Return "0" on line 2499
> 
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> ---
>  drivers/infiniband/hw/qedr/verbs.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-25 16:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-16 17:37 [PATCH] infiniband: hw: qedr: Remove Unneeded variable rc Hariprasad Kelam
2019-07-17  6:11 ` Michal Kalderon
2019-07-25 16:57 ` 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.