All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RDMA/bnxt_re: remove unneeded variable
@ 2021-11-09 11:32 cgel.zte
  2021-11-09 14:30 ` Devesh Sharma
  2021-11-16 17:57 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: cgel.zte @ 2021-11-09 11:32 UTC (permalink / raw)
  To: selvin.xavier
  Cc: dledford, jgg, linux-rdma, linux-kernel, Changcheng Deng, Zeal Robot

From: Changcheng Deng <deng.changcheng@zte.com.cn>

Fix the following coccicheck review:
./drivers/infiniband/hw/bnxt_re/main.c: 896: 5-7: Unneeded variable

Remove unneeded variable used to store return value.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
 drivers/infiniband/hw/bnxt_re/main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
index 4fa3b14b2613..2ce0e75f7b2d 100644
--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -894,7 +894,6 @@ static int bnxt_re_srqn_handler(struct bnxt_qplib_nq *nq,
 	struct bnxt_re_srq *srq = container_of(handle, struct bnxt_re_srq,
 					       qplib_srq);
 	struct ib_event ib_event;
-	int rc = 0;
 
 	ib_event.device = &srq->rdev->ibdev;
 	ib_event.element.srq = &srq->ib_srq;
@@ -908,7 +907,7 @@ static int bnxt_re_srqn_handler(struct bnxt_qplib_nq *nq,
 		(*srq->ib_srq.event_handler)(&ib_event,
 					     srq->ib_srq.srq_context);
 	}
-	return rc;
+	return 0;
 }
 
 static int bnxt_re_cqn_handler(struct bnxt_qplib_nq *nq,
-- 
2.25.1


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

* RE: [PATCH] RDMA/bnxt_re: remove unneeded variable
  2021-11-09 11:32 [PATCH] RDMA/bnxt_re: remove unneeded variable cgel.zte
@ 2021-11-09 14:30 ` Devesh Sharma
  2021-11-16 17:57 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Devesh Sharma @ 2021-11-09 14:30 UTC (permalink / raw)
  To: cgel.zte, selvin.xavier
  Cc: dledford, jgg, linux-rdma, linux-kernel, Changcheng Deng, Zeal Robot



> -----Original Message-----
> From: cgel.zte@gmail.com <cgel.zte@gmail.com>
> Sent: 09 November 2021 17:02
> To: selvin.xavier@broadcom.com
> Cc: dledford@redhat.com; jgg@ziepe.ca; linux-rdma@vger.kernel.org; linux-
> kernel@vger.kernel.org; Changcheng Deng
> <deng.changcheng@zte.com.cn>; Zeal Robot <zealci@zte.com.cn>
> Subject: [PATCH] RDMA/bnxt_re: remove unneeded variable
> 
> From: Changcheng Deng <deng.changcheng@zte.com.cn>
> 
> Fix the following coccicheck review:
> ./drivers/infiniband/hw/bnxt_re/main.c: 896: 5-7: Unneeded variable
> 
> Remove unneeded variable used to store return value.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
> ---
>  drivers/infiniband/hw/bnxt_re/main.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/bnxt_re/main.c
> b/drivers/infiniband/hw/bnxt_re/main.c
> index 4fa3b14b2613..2ce0e75f7b2d 100644
> --- a/drivers/infiniband/hw/bnxt_re/main.c
> +++ b/drivers/infiniband/hw/bnxt_re/main.c
> @@ -894,7 +894,6 @@ static int bnxt_re_srqn_handler(struct bnxt_qplib_nq
> *nq,
>  	struct bnxt_re_srq *srq = container_of(handle, struct bnxt_re_srq,
>  					       qplib_srq);
>  	struct ib_event ib_event;
> -	int rc = 0;
> 
>  	ib_event.device = &srq->rdev->ibdev;
>  	ib_event.element.srq = &srq->ib_srq;
> @@ -908,7 +907,7 @@ static int bnxt_re_srqn_handler(struct bnxt_qplib_nq
> *nq,
>  		(*srq->ib_srq.event_handler)(&ib_event,
>  					     srq->ib_srq.srq_context);
>  	}
> -	return rc;
> +	return 0;
>  }
> 
>  static int bnxt_re_cqn_handler(struct bnxt_qplib_nq *nq,

Looks good to me
Reviewed-By: Devesh Sharma <devesh.s.sharma@oracle.com>
> --
> 2.25.1


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

* Re: [PATCH] RDMA/bnxt_re: remove unneeded variable
  2021-11-09 11:32 [PATCH] RDMA/bnxt_re: remove unneeded variable cgel.zte
  2021-11-09 14:30 ` Devesh Sharma
@ 2021-11-16 17:57 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2021-11-16 17:57 UTC (permalink / raw)
  To: cgel.zte
  Cc: selvin.xavier, dledford, linux-rdma, linux-kernel,
	Changcheng Deng, Zeal Robot

On Tue, Nov 09, 2021 at 11:32:27AM +0000, cgel.zte@gmail.com wrote:
> From: Changcheng Deng <deng.changcheng@zte.com.cn>
> 
> Fix the following coccicheck review:
> ./drivers/infiniband/hw/bnxt_re/main.c: 896: 5-7: Unneeded variable
> 
> Remove unneeded variable used to store return value.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
> Reviewed-By: Devesh Sharma <devesh.s.sharma@oracle.com>
> ---
>  drivers/infiniband/hw/bnxt_re/main.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:[~2021-11-16 17:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09 11:32 [PATCH] RDMA/bnxt_re: remove unneeded variable cgel.zte
2021-11-09 14:30 ` Devesh Sharma
2021-11-16 17: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.