[PATCH 05/15] IB/hfi1: Fix pio wait counter double increment

Dennis Dalessandro
2016-05-12T17:22:57Z

From: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

The code unconditionlly increments the pio wait counter
making the counter inacurate and unusable.

Fixes: 14553ca11039 ("staging/rdma/hfi1: Adaptive PIO for short messages")
Reviewed-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/staging/rdma/hfi1/verbs.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/rdma/hfi1/verbs.c b/drivers/staging/rdma/hfi1/verbs.c
index 9cdc85f..f3531fd 100644
--- a/drivers/staging/rdma/hfi1/verbs.c
+++ b/drivers/staging/rdma/hfi1/verbs.c
@@ -946,7 +946,6 @@ static int pio_wait(struct rvt_qp *qp,

dev->n_piowait += !!(flag & RVT_S_WAIT_PIO);
dev->n_piodrain += !!(flag & RVT_S_WAIT_PIO_DRAIN);
- dev->n_piowait++;
qp->s_flags |= flag;
was_empty = list_empty(&sc->piowait);
list_add_tail(&priv->s_iowait.list, &sc->piowait);