[ofa-general] [PATCH] opensm: remove not used osm_mgrp_apply_func() function

Sasha Khapyorsky sashak at voltaire.com
Sun Sep 6 08:50:06 PDT 2009


Remove not used osm_mgrp_apply_func() function and associated types,
variables, etc..

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/include/opensm/osm_multicast.h |   66 ---------------------------------
 opensm/opensm/osm_multicast.c         |   38 -------------------
 2 files changed, 0 insertions(+), 104 deletions(-)

diff --git a/opensm/include/opensm/osm_multicast.h b/opensm/include/opensm/osm_multicast.h
index 9a47de5..eda447e 100644
--- a/opensm/include/opensm/osm_multicast.h
+++ b/opensm/include/opensm/osm_multicast.h
@@ -174,38 +174,6 @@ typedef struct osm_mgrp {
 * SEE ALSO
 *********/
 
-/****f* OpenSM: Vendor API/osm_mgrp_func_t
-* NAME
-*	osm_mgrp_func_t
-*
-* DESCRIPTION
-*	Callback for the osm_mgrp_apply_func function.
-*	The callback function must not modify the tree linkage.
-*
-* SYNOPSIS
-*/
-typedef void (*osm_mgrp_func_t) (IN const osm_mgrp_t * const p_mgrp,
-				 IN const osm_mtree_node_t * const p_mtn,
-				 IN void *context);
-/*
-* PARAMETERS
-*	p_mgrp
-*		[in] Pointer to the multicast group object.
-*
-*	p_mtn
-*		[in] Pointer to the multicast tree node.
-*
-*	context
-*		[in] User context.
-*
-* RETURN VALUES
-*	None.
-*
-* NOTES
-*
-* SEE ALSO
-*********/
-
 /****f* OpenSM: Multicast Group/osm_mgrp_new
 * NAME
 *	osm_mgrp_new
@@ -456,39 +424,5 @@ osm_mgrp_delete_port(IN osm_subn_t * const p_subn,
 int osm_mgrp_remove_port(osm_subn_t *subn, osm_log_t *log, osm_mgrp_t *mgrp,
 			 osm_mcm_port_t *mcm, uint8_t join_state);
 
-/****f* OpenSM: Multicast Group/osm_mgrp_apply_func
-* NAME
-*	osm_mgrp_apply_func
-*
-* DESCRIPTION
-*	Calls the specified function for each element in the tree.
-*	Elements are passed to the callback function in no particular order.
-*
-* SYNOPSIS
-*/
-void
-osm_mgrp_apply_func(const osm_mgrp_t * const p_mgrp,
-		    osm_mgrp_func_t p_func, void *context);
-/*
-* PARAMETERS
-*	p_mgrp
-*		[in] Pointer to an osm_mgrp_t object.
-*
-*	p_func
-*		[in] Pointer to the users callback function.
-*
-*	context
-*		[in] User context passed to the callback function.
-*
-*
-* RETURN VALUES
-*	None.
-*
-* NOTES
-*
-* SEE ALSO
-*	Multicast Group
-*********/
-
 END_C_DECLS
 #endif				/* _OSM_MULTICAST_H_ */
diff --git a/opensm/opensm/osm_multicast.c b/opensm/opensm/osm_multicast.c
index d2733c4..4b4a6b0 100644
--- a/opensm/opensm/osm_multicast.c
+++ b/opensm/opensm/osm_multicast.c
@@ -260,41 +260,3 @@ boolean_t osm_mgrp_is_port_present(IN const osm_mgrp_t * p_mgrp,
 		*pp_mcm_port = NULL;
 	return FALSE;
 }
-
-/**********************************************************************
- **********************************************************************/
-static void mgrp_apply_func_sub(const osm_mgrp_t * p_mgrp,
-				const osm_mtree_node_t * p_mtn,
-				osm_mgrp_func_t p_func, void *context)
-{
-	uint8_t i = 0;
-	uint8_t max_children;
-	osm_mtree_node_t *p_child_mtn;
-
-	/* Call the user, then recurse. */
-	p_func(p_mgrp, p_mtn, context);
-
-	max_children = osm_mtree_node_get_max_children(p_mtn);
-	for (i = 0; i < max_children; i++) {
-		p_child_mtn = osm_mtree_node_get_child(p_mtn, i);
-		if (p_child_mtn)
-			mgrp_apply_func_sub(p_mgrp, p_child_mtn, p_func,
-					    context);
-	}
-}
-
-/**********************************************************************
- **********************************************************************/
-void osm_mgrp_apply_func(const osm_mgrp_t * p_mgrp, osm_mgrp_func_t p_func,
-			 void *context)
-{
-	osm_mtree_node_t *p_mtn;
-
-	CL_ASSERT(p_mgrp);
-	CL_ASSERT(p_func);
-
-	p_mtn = p_mgrp->p_root;
-
-	if (p_mtn)
-		mgrp_apply_func_sub(p_mgrp, p_mtn, p_func, context);
-}
-- 
1.6.4.2




More information about the general mailing list