[ofa-general] [PATCH] opensm: remove osm_physp_get_mod_pkey_tbl()
Sasha Khapyorsky
sashak at voltaire.com
Sun Jan 27 07:42:00 PST 2008
Remove osm_physp_get_mod_pkey_tbl() which is perfectly duplicated by the
original osm_physp_get_pkey_tbl().
Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
opensm/include/opensm/osm_port.h | 34 ----------------------------------
opensm/opensm/osm_pkey_mgr.c | 6 +++---
2 files changed, 3 insertions(+), 37 deletions(-)
diff --git a/opensm/include/opensm/osm_port.h b/opensm/include/opensm/osm_port.h
index 963e13b..a9bf78f 100644
--- a/opensm/include/opensm/osm_port.h
+++ b/opensm/include/opensm/osm_port.h
@@ -536,40 +536,6 @@ static inline const osm_pkey_tbl_t *osm_physp_get_pkey_tbl(IN const osm_physp_t
* Port, Physical Port
*********/
-/****f* OpenSM: Physical Port/osm_physp_get_mod_pkey_tbl
-* NAME
-* osm_physp_get_mod_pkey_tbl
-*
-* DESCRIPTION
-* Returns a NON CONST pointer to the P_Key table object of the Physical Port object.
-*
-* SYNOPSIS
-*/
-static inline osm_pkey_tbl_t *osm_physp_get_mod_pkey_tbl(IN osm_physp_t *
- const p_physp)
-{
- CL_ASSERT(osm_physp_is_valid(p_physp));
- /*
- (14.2.5.7) - the block number valid values are 0-2047, and are further
- limited by the size of the P_Key table specified by the PartitionCap on the node.
- */
- return (&p_physp->pkeys);
-};
-
-/*
-* PARAMETERS
-* p_physp
-* [in] Pointer to an osm_physp_t object.
-*
-* RETURN VALUES
-* The pointer to the P_Key table object.
-*
-* NOTES
-*
-* SEE ALSO
-* Port, Physical Port
-*********/
-
/****f* OpenSM: Physical Port/osm_physp_set_slvl_tbl
* NAME
* osm_physp_set_slvl_tbl
diff --git a/opensm/opensm/osm_pkey_mgr.c b/opensm/opensm/osm_pkey_mgr.c
index df17549..33eeb8b 100644
--- a/opensm/opensm/osm_pkey_mgr.c
+++ b/opensm/opensm/osm_pkey_mgr.c
@@ -97,7 +97,7 @@ pkey_mgr_process_physical_port(IN osm_log_t * p_log,
char *stat = NULL;
osm_pending_pkey_t *p_pending;
- p_pkey_tbl = osm_physp_get_mod_pkey_tbl(p_physp);
+ p_pkey_tbl = &p_physp->pkeys;
p_pending = (osm_pending_pkey_t *) malloc(sizeof(osm_pending_pkey_t));
if (!p_pending) {
osm_log(p_log, OSM_LOG_ERROR,
@@ -294,7 +294,7 @@ static boolean_t pkey_mgr_update_port(osm_log_t * p_log, osm_sm_t * sm,
return FALSE;
p_node = osm_physp_get_node_ptr(p_physp);
- p_pkey_tbl = osm_physp_get_mod_pkey_tbl(p_physp);
+ p_pkey_tbl = &p_physp->pkeys;
num_of_blocks = osm_pkey_tbl_get_num_blocks(p_pkey_tbl);
max_num_of_blocks =
pkey_mgr_get_physp_max_blocks(sm->p_subn, p_physp);
@@ -434,7 +434,7 @@ pkey_mgr_update_peer_port(osm_log_t * p_log, osm_sm_t * sm,
return FALSE;
p_pkey_tbl = osm_physp_get_pkey_tbl(p_physp);
- p_peer_pkey_tbl = osm_physp_get_mod_pkey_tbl(peer);
+ p_peer_pkey_tbl = &peer->pkeys;
num_of_blocks = osm_pkey_tbl_get_num_blocks(p_pkey_tbl);
peer_max_blocks = pkey_mgr_get_physp_max_blocks(p_subn, peer);
if (peer_max_blocks < p_pkey_tbl->used_blocks) {
--
1.5.4.rc5
More information about the general
mailing list