From 437ff786e24934bb39493f9c381595e6fab6d338 Mon Sep 17 00:00:00 2001 From: Kaike Wan Date: Mon, 18 Dec 2017 19:56:30 -0800 Subject: [PATCH] IB/rdmavt: No need to cancel RNRNAK retry timer when it is running When the rdmavt's RNRNAK timer is fired, it tries to cancel the timer by calling hrtimer_try_to_cancel(), which always returns -1 because the timer is currently running. This patch removes this useless call. Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford --- drivers/infiniband/sw/rdmavt/qp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c index 9177df60742a..73705a19bd2e 100644 --- a/drivers/infiniband/sw/rdmavt/qp.c +++ b/drivers/infiniband/sw/rdmavt/qp.c @@ -2110,10 +2110,8 @@ static int rvt_stop_rnr_timer(struct rvt_qp *qp) lockdep_assert_held(&qp->s_lock); /* Remove QP from rnr timer */ - if (qp->s_flags & RVT_S_WAIT_RNR) { + if (qp->s_flags & RVT_S_WAIT_RNR) qp->s_flags &= ~RVT_S_WAIT_RNR; - rval = hrtimer_try_to_cancel(&qp->s_rnr_timer); - } return rval; }