[openib-general] [PATCH 2/2] OpenSM: Eliminate no longer needed routines in osm_inform.c

Hal Rosenstock halr at voltaire.com
Wed Dec 20 11:03:45 PST 2006


OpenSM: Eliminate no longer needed routines in osm_inform.c

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

diff --git a/osm/include/opensm/osm_inform.h b/osm/include/opensm/osm_inform.h
index 0bc8810..3e8e122 100644
--- a/osm/include/opensm/osm_inform.h
+++ b/osm/include/opensm/osm_inform.h
@@ -223,103 +223,6 @@ osm_infr_destroy(
 *	Inform Record, osm_infr_construct, osm_infr_destroy
 *********/
 
-/****f* OpenSM: Inform Record/osm_infr_get_by_rid
-* NAME
-*	osm_infr_get_by_rid
-*
-* DESCRIPTION
-*	Find a matching osm_infr_t in the subnet DB by inform_info_record RID 
-*
-* SYNOPSIS
-*/
-osm_infr_t*
-osm_infr_get_by_rid(
-	IN osm_subn_t	const	*p_subn,
-	IN osm_log_t	*p_log,
-	IN ib_inform_info_record_t* const p_inf_rec );
-/*
-* PARAMETERS
-*	p_subn 
-*		[in] Pointer to the subnet object
-*
-*	p_log
-*		[in] Pointer to the log object
-*
-*	p_inf_rec
-*		[in] Pointer to an inform_info record with the search RID
-*
-* RETURN
-*	The matching osm_infr_t
-* SEE ALSO
-*	Inform Record, osm_infr_construct, osm_infr_destroy
-*********/
-
-/****f* OpenSM: Inform Record/osm_infr_get_by_gid
-* NAME
-*	osm_infr_get_by_gid
-*
-* DESCRIPTION
-*	Find a matching osm_infr_t in the subnet DB by inform_info_record
-*	subscriber GID
-*
-* SYNOPSIS
-*/
-osm_infr_t*
-osm_infr_get_by_gid(
-	IN osm_subn_t	const	*p_subn,
-	IN osm_log_t	*p_log,
-	IN ib_inform_info_record_t* const p_inf_rec );
-/*
-* PARAMETERS
-*	p_subn 
-*		[in] Pointer to the subnet object
-*
-*	p_log
-*		[in] Pointer to the log object
-*
-*	p_inf_rec
-*		[in] Pointer to an inform_info record with the search
-*		     subscriber GID
-*
-* RETURN
-*	The matching osm_infr_t
-* SEE ALSO
-*	Inform Record, osm_infr_construct, osm_infr_destroy
-*********/
-
-/****f* OpenSM: Inform Record/osm_infr_get_by_enum
-* NAME
-*       osm_infr_get_by_enum
-*
-* DESCRIPTION
-*       Find a matching osm_infr_t in the subnet DB by inform_info_record
-*       subscriber enum 
-*
-* SYNOPSIS
-*/
-osm_infr_t*
-osm_infr_get_by_enum(
-	IN osm_subn_t	const	*p_subn,
-	IN osm_log_t	*p_log,
-	IN ib_inform_info_record_t* const p_inf_rec );
-/*
-* PARAMETERS
-*	p_subn 
-*		[in] Pointer to the subnet object
-*
-*	p_log
-*		[in] Pointer to the log object
-*
-*	p_inf_rec
-*		[in] Pointer to an inform_info record with the search
-*		     subscriber enum 
-*
-* RETURN
-*	The matching osm_infr_t
-* SEE ALSO
-*	Inform Record, osm_infr_construct, osm_infr_destroy
-*********/
-
 /****f* OpenSM: Inform Record/osm_infr_get_by_rec
 * NAME
 *	osm_infr_get_by_rec
diff --git a/osm/opensm/osm_inform.c b/osm/opensm/osm_inform.c
index 074a3f9..98b7ec4 100644
--- a/osm/opensm/osm_inform.c
+++ b/osm/opensm/osm_inform.c
@@ -117,148 +117,6 @@ osm_infr_new(
 }
 
 /**********************************************************************
- * Match an infr by the RID of the stored inform_info_record
- **********************************************************************/
-static cl_status_t
-__match_rid_of_inf_rec(
-  IN  const cl_list_item_t* const p_list_item,
-  IN  void*                       context )
-{
-  ib_inform_info_record_t* p_infr_rec = (ib_inform_info_record_t  *)context;
-  osm_infr_t* p_infr = (osm_infr_t*)p_list_item;
-  int32_t count;
-
-  count = memcmp(
-    &p_infr->inform_record,
-    p_infr_rec,
-    sizeof(p_infr_rec->subscriber_gid) +
-    sizeof(p_infr_rec->subscriber_enum) );
-
-  if(count == 0)
-    return CL_SUCCESS;
-  else
-    return CL_NOT_FOUND;
-}
-
-/**********************************************************************
- * Match an infr by the subscriber GID of the stored inform_info_record
- **********************************************************************/
-static cl_status_t
-__match_gid_of_inf_rec(
-  IN  const cl_list_item_t* const p_list_item,
-  IN  void*                       context )
-{
-  ib_inform_info_record_t* p_infr_rec = (ib_inform_info_record_t  *)context;
-  osm_infr_t* p_infr = (osm_infr_t*)p_list_item;
-  int32_t count;
-
-  count = memcmp(
-    &p_infr->inform_record,
-    p_infr_rec,
-    sizeof(p_infr_rec->subscriber_gid) );
-
-  if(count == 0)
-    return CL_SUCCESS;
-  else
-    return CL_NOT_FOUND;
-}
-
-/**********************************************************************
- * Match an infr by the subscriber enum of the stored inform_info_record
- **********************************************************************/
-static cl_status_t
-__match_enum_of_inf_rec(
-  IN  const cl_list_item_t* const p_list_item,
-  IN  void*                       context )
-{
-  ib_inform_info_record_t* p_infr_rec = (ib_inform_info_record_t  *)context;
-  osm_infr_t* p_infr = (osm_infr_t*)p_list_item;
-  int32_t count;
-
-  count = memcmp(
-    &p_infr->inform_record.subscriber_enum,
-    &p_infr_rec->subscriber_enum,
-    sizeof(p_infr_rec->subscriber_enum) );
-
-  if(count == 0)
-    return CL_SUCCESS;
-  else
-    return CL_NOT_FOUND;
-}
-
-/**********************************************************************
- **********************************************************************/
-osm_infr_t*
-osm_infr_get_by_rid(
-  IN osm_subn_t const *p_subn,
-  IN osm_log_t *p_log,
-  IN ib_inform_info_record_t* const p_infr_rec )
-{
-  cl_list_item_t* p_list_item;
-
-  OSM_LOG_ENTER( p_log, osm_infr_get_by_rid );
-
-  p_list_item = cl_qlist_find_from_head(
-    &p_subn->sa_infr_list,
-    __match_rid_of_inf_rec,
-    p_infr_rec );
-
-  if( p_list_item == cl_qlist_end( &p_subn->sa_infr_list ) )
-    p_list_item = NULL;
-
-  OSM_LOG_EXIT( p_log );
-  return (osm_infr_t*)p_list_item;
-}
-
-/**********************************************************************
- **********************************************************************/
-osm_infr_t*
-osm_infr_get_by_gid(
-  IN osm_subn_t const *p_subn,
-  IN osm_log_t *p_log,
-  IN ib_inform_info_record_t* const p_infr_rec )
-{
-  cl_list_item_t* p_list_item;
-
-  OSM_LOG_ENTER( p_log, osm_infr_get_by_gid );
-
-  p_list_item = cl_qlist_find_from_head(
-    &p_subn->sa_infr_list,
-    __match_gid_of_inf_rec,
-    p_infr_rec );
-
-  if( p_list_item == cl_qlist_end( &p_subn->sa_infr_list ) )
-    p_list_item = NULL;
-
-  OSM_LOG_EXIT( p_log );
-  return (osm_infr_t*)p_list_item;
-}
-
-/**********************************************************************
- **********************************************************************/
-osm_infr_t*
-osm_infr_get_by_enum(
-  IN osm_subn_t const *p_subn,
-  IN osm_log_t *p_log,
-  IN ib_inform_info_record_t* const p_infr_rec )
-{
-  cl_list_item_t* p_list_item;
-
-  OSM_LOG_ENTER( p_log, osm_infr_get_by_enum );
-
-  p_list_item = cl_qlist_find_from_head(
-    &p_subn->sa_infr_list,
-    __match_enum_of_inf_rec,
-    p_infr_rec );
-
-  if( p_list_item == cl_qlist_end( &p_subn->sa_infr_list ) )
-    p_list_item = NULL;
-
-  OSM_LOG_EXIT( p_log );
-  return (osm_infr_t*)p_list_item;
-}
-
-/**********************************************************************
  **********************************************************************/
 void
 __dump_all_informs(







More information about the general mailing list