diff mbox series

[06/19] RDMA/siw: No need to check term_info.valid before call siw_send_terminate

Message ID 20231009071801.10210-7-guoqing.jiang@linux.dev (mailing list archive)
State Superseded
Headers show
Series Cleanup for siw | expand

Commit Message

Guoqing Jiang Oct. 9, 2023, 7:17 a.m. UTC
Remove the redundate checking since siw_send_terminate check it inside.

Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
---
 drivers/infiniband/sw/siw/siw_cm.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Bernard Metzler Oct. 25, 2023, 12:39 p.m. UTC | #1
> -----Original Message-----
> From: Guoqing Jiang <guoqing.jiang@linux.dev>
> Sent: Monday, October 9, 2023 9:18 AM
> To: Bernard Metzler <BMT@zurich.ibm.com>; jgg@ziepe.ca; leon@kernel.org
> Cc: linux-rdma@vger.kernel.org
> Subject: [EXTERNAL] [PATCH 06/19] RDMA/siw: No need to check
> term_info.valid before call siw_send_terminate
> 
> Remove the redundate checking since siw_send_terminate check it inside.
> 
> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
> ---
>  drivers/infiniband/sw/siw/siw_cm.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/infiniband/sw/siw/siw_cm.c
> b/drivers/infiniband/sw/siw/siw_cm.c
> index 0a1525d76ba1..c8a9118677d7 100644
> --- a/drivers/infiniband/sw/siw/siw_cm.c
> +++ b/drivers/infiniband/sw/siw/siw_cm.c
> @@ -393,8 +393,7 @@ void siw_qp_cm_drop(struct siw_qp *qp, int schedule)
>  		}
>  		siw_dbg_cep(cep, "immediate close, state %d\n", cep->state);
> 
> -		if (qp->term_info.valid)
> -			siw_send_terminate(qp);
> +		siw_send_terminate(qp);
> 
>  		if (cep->cm_id) {
>  			switch (cep->state) {
> @@ -1060,7 +1059,7 @@ static void siw_cm_work_handler(struct work_struct
> *w)
>  		/*
>  		 * QP scheduled LLP close
>  		 */
> -		if (cep->qp && cep->qp->term_info.valid)
> +		if (cep->qp)
>  			siw_send_terminate(cep->qp);
> 
>  		if (cep->cm_id)
> --
> 2.35.3

Thanks, makes sense!

Acked-by: Bernard Metzler <bmt@zurich.ibm.com>
diff mbox series

Patch

diff --git a/drivers/infiniband/sw/siw/siw_cm.c b/drivers/infiniband/sw/siw/siw_cm.c
index 0a1525d76ba1..c8a9118677d7 100644
--- a/drivers/infiniband/sw/siw/siw_cm.c
+++ b/drivers/infiniband/sw/siw/siw_cm.c
@@ -393,8 +393,7 @@  void siw_qp_cm_drop(struct siw_qp *qp, int schedule)
 		}
 		siw_dbg_cep(cep, "immediate close, state %d\n", cep->state);
 
-		if (qp->term_info.valid)
-			siw_send_terminate(qp);
+		siw_send_terminate(qp);
 
 		if (cep->cm_id) {
 			switch (cep->state) {
@@ -1060,7 +1059,7 @@  static void siw_cm_work_handler(struct work_struct *w)
 		/*
 		 * QP scheduled LLP close
 		 */
-		if (cep->qp && cep->qp->term_info.valid)
+		if (cep->qp)
 			siw_send_terminate(cep->qp);
 
 		if (cep->cm_id)