[openib-general] [PATCH] [TRIVIAL] OpenSM/osm_sm_mad_ctrl.c: Make some dead code be compiled out

Hal Rosenstock halr at voltaire.com
Wed May 17 04:13:57 PDT 2006


OpenSM/osm_sm_mad_ctrl.c: Make some dead code be compiled out

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

Index: opensm/osm_sm_mad_ctrl.c
===================================================================
--- opensm/osm_sm_mad_ctrl.c	(revision 7202)
+++ opensm/osm_sm_mad_ctrl.c	(working copy)
@@ -803,7 +803,9 @@ __osm_sm_mad_ctrl_send_err_cb(
   IN osm_madw_t *p_madw )
 {
   osm_sm_mad_ctrl_t* p_ctrl = (osm_sm_mad_ctrl_t*)bind_context;
+#if 0
   osm_physp_t* p_physp;
+#endif
   ib_api_status_t status;
   ib_smp_t* p_smp;
 
@@ -844,25 +846,26 @@ __osm_sm_mad_ctrl_send_err_cb(
      lid.
   */
   /* For now - do not add the alternate dr path to the release */
-  if (0)
-    if ( p_madw->mad_addr.dest_lid != 0xFFFF )
+#if 0
+  if ( p_madw->mad_addr.dest_lid != 0xFFFF )
+  {
+    p_physp =
+      osm_get_physp_by_mad_addr(p_ctrl->p_log,
+                                p_ctrl->p_subn,
+                                &(p_madw->mad_addr));
+    if (!p_physp)
     {
-      p_physp =
-        osm_get_physp_by_mad_addr(p_ctrl->p_log,
-                                  p_ctrl->p_subn,
-                                  &(p_madw->mad_addr));
-      if (! p_physp)
-      {
-        osm_log( p_ctrl->p_log, OSM_LOG_ERROR,
-                 "__osm_sm_mad_ctrl_send_err_cb: ERR 3114: "
-                 "Failed to find the corresponding phys port\n");
-      }
-      else
-      {
-        osm_physp_replace_dr_path_with_alternate_dr_path(
-          p_ctrl->p_log, p_ctrl->p_subn, p_physp, p_madw->h_bind );
-      }
+      osm_log( p_ctrl->p_log, OSM_LOG_ERROR,
+               "__osm_sm_mad_ctrl_send_err_cb: ERR 3114: "
+               "Failed to find the corresponding phys port\n");
     }
+    else
+    {
+      osm_physp_replace_dr_path_with_alternate_dr_path(
+      p_ctrl->p_log, p_ctrl->p_subn, p_physp, p_madw->h_bind );
+    }
+  }
+#endif
 
   /*
     An error occurred.  No response was received to a request MAD.






More information about the general mailing list