Skip to contentSkip to conversation

RDMA/nes: clean up a conditon

PATCH In review Dan Carpenter 2 participants 2 messages Feb 6, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/nes: clean up a conditon

We don't need to test "ret" twice and also the white space is messed up.

drivers/infiniband/hw/nes/nes_verbs.c +1 -3
index 8308e3634767..2db2b58f70d9 100644
@@ -3134,9 +3134,7 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
 				" original_last_aeq = 0x%04X. last_aeq = 0x%04X.\n",
 				nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount),
 				original_last_aeq, nesqp->last_aeq);
-		if ((!ret) ||
-				((original_last_aeq != NES_AEQE_AEID_RDMAP_ROE_BAD_LLP_CLOSE) &&
-				(ret))) {
+		if (!ret || original_last_aeq != NES_AEQE_AEID_RDMAP_ROE_BAD_LLP_CLOSE) {
 			if (dont_wait) {
 				if (nesqp->cm_id && nesqp->hw_tcp_state != 0) {
 					nes_debug(NES_DBG_MOD_QP, "QP%u Queuing fake disconnect for QP refcount (%d),"
Reviewed-by on v1 1/1
#1 lore raw

Hello Dan,

Your patch seems fine. If you want, feel free to add:

Thank you,
Tatyana

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dan Carpenter
Sent: Thursday, February 06, 2014 6:48 AM
To: Latif, Faisal
Cc: Roland Dreier; Hefty, Sean; Hal Rosenstock; [email protected]; [email protected]
Subject: [patch] RDMA/nes: clean up a conditon

We don't need to test "ret" twice and also the white space is messed up.

drivers/infiniband/hw/nes/nes_verbs.c +2 -3
index 8308e3634767..2db2b58f70d9 100644
@@ -3134,9 +3134,7 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
 				" original_last_aeq = 0x%04X. last_aeq = 0x%04X.\n",
 				nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount),
 				original_last_aeq, nesqp->last_aeq);
-		if ((!ret) ||
-				((original_last_aeq != NES_AEQE_AEID_RDMAP_ROE_BAD_LLP_CLOSE) &&
-				(ret))) {
+		if (!ret || original_last_aeq != 
+NES_AEQE_AEID_RDMAP_ROE_BAD_LLP_CLOSE) {
 			if (dont_wait) {
 				if (nesqp->cm_id && nesqp->hw_tcp_state != 0) {

nes_debug(NES_DBG_MOD_QP, "QP%u Queuing fake disconnect for QP refcount (%d),"
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html