Skip to content

Commit

Permalink
RDMA/nes: Remove unnecessary if-else statement
Browse files Browse the repository at this point in the history
Remove unnecessary if-else statement -- we do the same thing either way.

Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
  • Loading branch information
Tatyana Nikolova authored and Roland Dreier committed Oct 3, 2012
1 parent d5fb476 commit a67b078
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions drivers/infiniband/hw/nes/nes_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3069,18 +3069,9 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
}

nesqp->ibqp_state = attr->qp_state;
if (((nesqp->iwarp_state & NES_CQP_QP_IWARP_STATE_MASK) ==
(u32)NES_CQP_QP_IWARP_STATE_RTS) &&
((next_iwarp_state & NES_CQP_QP_IWARP_STATE_MASK) >
(u32)NES_CQP_QP_IWARP_STATE_RTS)) {
nesqp->iwarp_state = next_iwarp_state & NES_CQP_QP_IWARP_STATE_MASK;
nes_debug(NES_DBG_MOD_QP, "Change nesqp->iwarp_state=%08x\n",
nesqp->iwarp_state);
} else {
nesqp->iwarp_state = next_iwarp_state & NES_CQP_QP_IWARP_STATE_MASK;
nes_debug(NES_DBG_MOD_QP, "Change nesqp->iwarp_state=%08x\n",
nesqp->iwarp_state);
}
nesqp->iwarp_state = next_iwarp_state & NES_CQP_QP_IWARP_STATE_MASK;
nes_debug(NES_DBG_MOD_QP, "Change nesqp->iwarp_state=%08x\n",
nesqp->iwarp_state);
}

if (attr_mask & IB_QP_ACCESS_FLAGS) {
Expand Down

0 comments on commit a67b078

Please sign in to comment.