[ofa-general] [PATCH] opensm: remove unused flag

Sasha Khapyorsky sashak at voltaire.com
Fri Nov 30 07:43:12 PST 2007


Remove unused (always FALSE) 'ignore_errors' flag from the context of
port_info mad.

Pointed out by Hal Rosenstock <hrosenstock at xsigo.com>.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/include/opensm/osm_madw.h  |    1 -
 opensm/opensm/osm_lid_mgr.c       |    1 -
 opensm/opensm/osm_link_mgr.c      |   12 +-----------
 opensm/opensm/osm_node_info_rcv.c |    2 --
 opensm/opensm/osm_pkey_mgr.c      |    1 -
 opensm/opensm/osm_port_info_rcv.c |    2 +-
 opensm/opensm/osm_state_mgr.c     |    1 -
 opensm/opensm/osm_sw_info_rcv.c   |    1 -
 8 files changed, 2 insertions(+), 19 deletions(-)

diff --git a/opensm/include/opensm/osm_madw.h b/opensm/include/opensm/osm_madw.h
index bdaa7bc..d4bcbc1 100644
--- a/opensm/include/opensm/osm_madw.h
+++ b/opensm/include/opensm/osm_madw.h
@@ -178,7 +178,6 @@ typedef struct _osm_pi_context {
 	boolean_t set_method;
 	boolean_t light_sweep;
 	boolean_t update_master_sm_base_lid;
-	boolean_t ignore_errors;
 	boolean_t active_transition;
 } osm_pi_context_t;
 /*********/
diff --git a/opensm/opensm/osm_lid_mgr.c b/opensm/opensm/osm_lid_mgr.c
index c7ab0e9..30e5713 100644
--- a/opensm/opensm/osm_lid_mgr.c
+++ b/opensm/opensm/osm_lid_mgr.c
@@ -1127,7 +1127,6 @@ __osm_lid_mgr_set_physp_pi(IN osm_lid_mgr_t * const p_mgr,
 	context.pi_context.port_guid = osm_physp_get_port_guid(p_physp);
 	context.pi_context.set_method = TRUE;
 	context.pi_context.update_master_sm_base_lid = FALSE;
-	context.pi_context.ignore_errors = FALSE;
 	context.pi_context.light_sweep = FALSE;
 	context.pi_context.active_transition = FALSE;
 
diff --git a/opensm/opensm/osm_link_mgr.c b/opensm/opensm/osm_link_mgr.c
index 56c65e4..b96b741 100644
--- a/opensm/opensm/osm_link_mgr.c
+++ b/opensm/opensm/osm_link_mgr.c
@@ -346,17 +346,7 @@ __osm_link_mgr_set_physp_pi(IN osm_link_mgr_t * const p_mgr,
 			send_set = TRUE;
 			p_pi->vl_high_limit = p_physp->vl_high_limit;
 		}
-
-		/* also the context can flag the need to check for errors. */
-		context.pi_context.ignore_errors = FALSE;
-	} else
-		/*
-		   Since the only change we try to do is to modify the port
-		   state we can ignore the errors that might be caused by a
-		   race in setting the state and the actual state the port is
-		   in.
-		 */
-		context.pi_context.ignore_errors = FALSE;
+	}
 
 	if (port_state != IB_LINK_NO_CHANGE &&
 	    port_state != ib_port_info_get_port_state(p_old_pi)) {
diff --git a/opensm/opensm/osm_node_info_rcv.c b/opensm/opensm/osm_node_info_rcv.c
index c889ce6..4571a0f 100644
--- a/opensm/opensm/osm_node_info_rcv.c
+++ b/opensm/opensm/osm_node_info_rcv.c
@@ -311,7 +311,6 @@ __osm_ni_rcv_process_new_node(IN const osm_ni_rcv_t * const p_rcv,
 	context.pi_context.port_guid = p_ni->port_guid;
 	context.pi_context.set_method = FALSE;
 	context.pi_context.update_master_sm_base_lid = FALSE;
-	context.pi_context.ignore_errors = FALSE;
 	context.pi_context.light_sweep = FALSE;
 	context.pi_context.active_transition = FALSE;
 
@@ -509,7 +508,6 @@ __osm_ni_rcv_process_existing_ca_or_router(IN const osm_ni_rcv_t * const p_rcv,
 	context.pi_context.port_guid = p_ni->port_guid;
 	context.pi_context.set_method = FALSE;
 	context.pi_context.update_master_sm_base_lid = FALSE;
-	context.pi_context.ignore_errors = FALSE;
 	context.pi_context.light_sweep = FALSE;
 
 	status = osm_req_get(p_rcv->p_gen_req,
diff --git a/opensm/opensm/osm_pkey_mgr.c b/opensm/opensm/osm_pkey_mgr.c
index 05caaf5..eb6cf54 100644
--- a/opensm/opensm/osm_pkey_mgr.c
+++ b/opensm/opensm/osm_pkey_mgr.c
@@ -239,7 +239,6 @@ pkey_mgr_enforce_partition(IN osm_log_t * p_log,
 	context.pi_context.port_guid = osm_physp_get_port_guid(p_physp);
 	context.pi_context.set_method = TRUE;
 	context.pi_context.update_master_sm_base_lid = FALSE;
-	context.pi_context.ignore_errors = FALSE;
 	context.pi_context.light_sweep = FALSE;
 	context.pi_context.active_transition = FALSE;
 
diff --git a/opensm/opensm/osm_port_info_rcv.c b/opensm/opensm/osm_port_info_rcv.c
index 70ee7df..dd3642d 100644
--- a/opensm/opensm/osm_port_info_rcv.c
+++ b/opensm/opensm/osm_port_info_rcv.c
@@ -528,7 +528,7 @@ osm_pi_rcv_process_set(IN const osm_pi_rcv_t * const p_rcv,
 	p_pi = (ib_port_info_t *) ib_smp_get_payload_ptr(p_smp);
 
 	/* check for error */
-	if (!p_context->ignore_errors && (cl_ntoh16(p_smp->status) & 0x7fff)) {
+	if (cl_ntoh16(p_smp->status) & 0x7fff) {
 		/* If port already ACTIVE, don't treat status 7 as error */
 		if (p_context->active_transition &&
 		    (cl_ntoh16(p_smp->status) & 0x7fff) == 0x1c) {
diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c
index c849741..1ff8eb7 100644
--- a/opensm/opensm/osm_state_mgr.c
+++ b/opensm/opensm/osm_state_mgr.c
@@ -565,7 +565,6 @@ __osm_state_mgr_get_remote_port_info(IN osm_state_mgr_t * const p_mgr,
 	    cl_hton64(osm_physp_get_port_num(p_physp));
 	mad_context.pi_context.set_method = FALSE;
 	mad_context.pi_context.light_sweep = TRUE;
-	mad_context.pi_context.ignore_errors = FALSE;
 	mad_context.pi_context.update_master_sm_base_lid = FALSE;
 	mad_context.pi_context.active_transition = FALSE;
 
diff --git a/opensm/opensm/osm_sw_info_rcv.c b/opensm/opensm/osm_sw_info_rcv.c
index fbaa23a..55c43e6 100644
--- a/opensm/opensm/osm_sw_info_rcv.c
+++ b/opensm/opensm/osm_sw_info_rcv.c
@@ -103,7 +103,6 @@ __osm_si_rcv_get_port_info(IN const osm_si_rcv_t * const p_rcv,
 	context.pi_context.port_guid = osm_physp_get_port_guid(p_physp);
 	context.pi_context.set_method = FALSE;
 	context.pi_context.update_master_sm_base_lid = FALSE;
-	context.pi_context.ignore_errors = FALSE;
 	context.pi_context.light_sweep = FALSE;
 	context.pi_context.active_transition = FALSE;
 
-- 
1.5.3.4.206.g58ba4




More information about the general mailing list