[openib-general] [PATCH] [MINOR] OpenSM: Minor improvement to a couple of SA error paths

Hal Rosenstock halr at voltaire.com
Tue Jun 6 06:45:00 PDT 2006


OpenSM: Minor improvement to a couple of SA error paths

Signed-off-by: Hal Rosenstock <halr at voltaire.com>

Index: opensm/osm_sa_slvl_record.c
===================================================================
--- opensm/osm_sa_slvl_record.c	(revision 7718)
+++ opensm/osm_sa_slvl_record.c	(working copy)
@@ -158,15 +158,6 @@ __osm_sa_slvl_create(
 
   OSM_LOG_ENTER( p_rcv->p_log, __osm_sa_slvl_create );
 
-  if (p_physp->p_node->node_info.node_type != IB_NODE_TYPE_SWITCH)
-  {
-    lid = osm_physp_get_port_info_ptr( p_physp )->base_lid;
-  }
-  else
-  {
-    lid = osm_node_get_base_lid( p_physp->p_node, 0 );
-  }
-
   p_rec_item = (osm_slvl_item_t*)cl_qlock_pool_get( &p_rcv->pool );
   if( p_rec_item == NULL )
   {
@@ -177,6 +168,15 @@ __osm_sa_slvl_create(
     goto Exit;
   }
 
+  if (p_physp->p_node->node_info.node_type != IB_NODE_TYPE_SWITCH)
+  {
+    lid = osm_physp_get_port_info_ptr( p_physp )->base_lid;
+  }
+  else
+  {
+    lid = osm_node_get_base_lid( p_physp->p_node, 0 );
+  }
+
   if( osm_log_is_active( p_rcv->p_log, OSM_LOG_DEBUG ) )
   {
     osm_log( p_rcv->p_log, OSM_LOG_ERROR,
Index: opensm/osm_sa_vlarb_record.c
===================================================================
--- opensm/osm_sa_vlarb_record.c	(revision 7718)
+++ opensm/osm_sa_vlarb_record.c	(working copy)
@@ -158,15 +158,6 @@ __osm_sa_vl_arb_create(
 
   OSM_LOG_ENTER( p_rcv->p_log, __osm_sa_vl_arb_create );
 
-  if (p_physp->p_node->node_info.node_type != IB_NODE_TYPE_SWITCH)
-  {
-    lid = osm_physp_get_port_info_ptr( p_physp )->base_lid;
-  }
-  else
-  {
-    lid = osm_node_get_base_lid( p_physp->p_node, 0 );
-  }
-
   p_rec_item = (osm_vl_arb_item_t*)cl_qlock_pool_get( &p_rcv->pool );
   if( p_rec_item == NULL )
   {
@@ -177,6 +168,15 @@ __osm_sa_vl_arb_create(
     goto Exit;
   }
 
+  if (p_physp->p_node->node_info.node_type != IB_NODE_TYPE_SWITCH)
+  {
+    lid = osm_physp_get_port_info_ptr( p_physp )->base_lid;
+  }
+  else
+  {
+    lid = osm_node_get_base_lid( p_physp->p_node, 0 );
+  }
+
   if( osm_log_is_active( p_rcv->p_log, OSM_LOG_DEBUG ) )
   {
     osm_log( p_rcv->p_log, OSM_LOG_ERROR,







More information about the general mailing list