osm_node_get_physp_ptr() return non-NULL values only for valid physical
ports - remove redundant checks.
Signed-off-by: Sasha Khapyorsky <[EMAIL PROTECTED]>
---
opensm/opensm/osm_ucast_cache.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/opensm/opensm/osm_ucast_cache.c b/opensm/opensm/osm_ucast_cache.c
index 355716a..3c32d35 100644
--- a/opensm/opensm/osm_ucast_cache.c
+++ b/opensm/opensm/osm_ucast_cache.c
@@ -963,12 +963,10 @@ osm_ucast_cache_add_link(osm_ucast_cache_t * p_cache,
goto Exit;
}
- if (((osm_node_get_type(p_node_1) == IB_NODE_TYPE_SWITCH) &&
- (!osm_node_get_physp_ptr(p_node_1, 0) ||
- !osm_physp_is_valid(osm_node_get_physp_ptr(p_node_1, 0)))) ||
- ((osm_node_get_type(p_node_2) == IB_NODE_TYPE_SWITCH) &&
- (!osm_node_get_physp_ptr(p_node_2, 0) ||
- !osm_physp_is_valid(osm_node_get_physp_ptr(p_node_2, 0))))) {
+ if ((osm_node_get_type(p_node_1) == IB_NODE_TYPE_SWITCH &&
+ !osm_node_get_physp_ptr(p_node_1, 0)) ||
+ (osm_node_get_type(p_node_2) == IB_NODE_TYPE_SWITCH &&
+ !osm_node_get_physp_ptr(p_node_2, 0))) {
/* we're caching a link when one of the nodes
has already been dropped and cached */
OSM_LOG(p_cache->p_ucast_mgr->p_log, OSM_LOG_VERBOSE,
--
1.6.0.1.196.g01914
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general