[ofa-general] [PATCH] RDMA/nes: nes_cm.c cleanup

Chien Tung ctung at neteffect.com
Mon Sep 15 12:58:02 PDT 2008


Author: Faisal Latif <flatif at neteffect.com>

* Misc cleanup in nes_cm.c

patch verified with rping.

Signed-off-by: Faisal Latif <flatif at neteffect.com>

--
Please queue for 2.6.28.

 drivers/infiniband/hw/nes/nes_cm.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index 499d3cf..8793aa4 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -1145,7 +1145,7 @@ static int rem_ref_cm_node(struct nes_cm_core *cm_core,
 	struct nes_timer_entry *recv_entry;
 	struct iw_cm_id *cm_id;
 	struct list_head *list_core, *list_node_temp;
-	struct nes_qp *nesqp;
+	struct nes_qp *nesqp = NULL;
 
 	if (!cm_node)
 		return -EINVAL;
@@ -1826,7 +1826,7 @@ static struct nes_cm_listener *mini_cm_listen(struct nes_cm_core *cm_core,
 /**
  * mini_cm_connect - make a connection node with params
  */
-struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core,
+static struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core,
 	struct nes_vnic *nesvnic, u16 private_data_len,
 	void *private_data, struct nes_cm_info *cm_info)
 {
@@ -1835,7 +1835,7 @@ struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core,
 	struct nes_cm_listener *loopbackremotelistener;
 	struct nes_cm_node *loopbackremotenode;
 	struct nes_cm_info loopback_cm_info;
-	u16 mpa_frame_size = sizeof(struct ietf_mpa_frame) + private_data_len;
+	u16 mpa_frame_size = 0;
 	struct ietf_mpa_frame *mpa_frame = NULL;
 
 	/* create a CM connection node */
@@ -1847,7 +1847,8 @@ struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core,
 	mpa_frame->flags = IETF_MPA_FLAGS_CRC;
 	mpa_frame->rev =  IETF_MPA_VERSION;
 	mpa_frame->priv_data_len = htons(private_data_len);
-
+	mpa_frame_size = sizeof(struct ietf_mpa_frame) +
+					private_data_len;
 	/* set our node side to client (active) side */
 	cm_node->tcp_cntxt.client = 1;
 	cm_node->tcp_cntxt.rcv_wscale = NES_CM_DEFAULT_RCV_WND_SCALE;



More information about the general mailing list