diff mbox

[1/1] IB/rxe: avoid calling WARN_ON_ONCE twice

Message ID 1526547322-21632-1-git-send-email-yanjun.zhu@oracle.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show

Commit Message

Zhu Yanjun May 17, 2018, 8:55 a.m. UTC
In the exit branch, WARN_ON_ONCE is called to show stack. So it is
not necessary to call WARN_ON_ONCE before going to exit.

Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
---
 drivers/infiniband/sw/rxe/rxe_comp.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Leon Romanovsky May 17, 2018, 9:05 a.m. UTC | #1
On Thu, May 17, 2018 at 04:55:22AM -0400, Zhu Yanjun wrote:
> In the exit branch, WARN_ON_ONCE is called to show stack. So it is
> not necessary to call WARN_ON_ONCE before going to exit.
>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
> ---
>  drivers/infiniband/sw/rxe/rxe_comp.c | 4 ----
>  1 file changed, 4 deletions(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Jason Gunthorpe May 17, 2018, 3:18 p.m. UTC | #2
On Thu, May 17, 2018 at 04:55:22AM -0400, Zhu Yanjun wrote:
> In the exit branch, WARN_ON_ONCE is called to show stack. So it is
> not necessary to call WARN_ON_ONCE before going to exit.
> 
> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
> Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
> ---
>  drivers/infiniband/sw/rxe/rxe_comp.c | 4 ----
>  1 file changed, 4 deletions(-)

Applied to for-next, thanks

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/infiniband/sw/rxe/rxe_comp.c b/drivers/infiniband/sw/rxe/rxe_comp.c
index 6cdc40e..f674d2a 100644
--- a/drivers/infiniband/sw/rxe/rxe_comp.c
+++ b/drivers/infiniband/sw/rxe/rxe_comp.c
@@ -661,7 +661,6 @@  int rxe_completer(void *arg)
 			    qp->qp_timeout_jiffies)
 				mod_timer(&qp->retrans_timer,
 					  jiffies + qp->qp_timeout_jiffies);
-			WARN_ON_ONCE(skb);
 			goto exit;
 
 		case COMPST_ERROR_RETRY:
@@ -675,7 +674,6 @@  int rxe_completer(void *arg)
 
 			/* there is nothing to retry in this case */
 			if (!wqe || (wqe->state == wqe_state_posted)) {
-				WARN_ON_ONCE(skb);
 				goto exit;
 			}
 
@@ -704,7 +702,6 @@  int rxe_completer(void *arg)
 					skb = NULL;
 				}
 
-				WARN_ON_ONCE(skb);
 				goto exit;
 
 			} else {
@@ -748,7 +745,6 @@  int rxe_completer(void *arg)
 				skb = NULL;
 			}
 
-			WARN_ON_ONCE(skb);
 			goto exit;
 		}
 	}