[ofa-general] ***SPAM*** [PATCH] opensm: Remove __osm_ prefixes

Hal Rosenstock hnrose at comcast.net
Mon Mar 23 05:30:12 PDT 2009


Also, some cosmetic formatting changes

Signed-off-by: Hal Rosenstock <hal.rosenstock at gmail.com>

---
diff --git a/opensm/opensm/osm_db_files.c b/opensm/opensm/osm_db_files.c
index 907b7c7..12457f4 100644
--- a/opensm/opensm/osm_db_files.c
+++ b/opensm/opensm/osm_db_files.c
@@ -423,7 +423,7 @@ Exit:
 
 /***************************************************************************
  ***************************************************************************/
-static int __osm_dump_tbl_entry(st_data_t key, st_data_t val, st_data_t arg)
+static int dump_tbl_entry(st_data_t key, st_data_t val, st_data_t arg)
 {
 	FILE *p_file = (FILE *) arg;
 	char *p_key = (char *)key;
@@ -462,8 +462,7 @@ int osm_db_store(IN osm_db_domain_t * p_domain)
 		goto Exit;
 	}
 
-	st_foreach(p_domain_imp->p_hash, __osm_dump_tbl_entry,
-		   (st_data_t) p_file);
+	st_foreach(p_domain_imp->p_hash, dump_tbl_entry, (st_data_t) p_file);
 	fclose(p_file);
 
 	/* move the domain file */
@@ -491,7 +490,7 @@ Exit:
  ***************************************************************************/
 /* simply de-allocate the key and the value and return the code
    that makes the st_foreach delete the entry */
-static int __osm_clear_tbl_entry(st_data_t key, st_data_t val, st_data_t arg)
+static int clear_tbl_entry(st_data_t key, st_data_t val, st_data_t arg)
 {
 	free((char *)key);
 	free((char *)val);
@@ -504,8 +503,7 @@ int osm_db_clear(IN osm_db_domain_t * p_domain)
 	    (osm_db_domain_imp_t *) p_domain->p_domain_imp;
 
 	cl_spinlock_acquire(&p_domain_imp->lock);
-	st_foreach(p_domain_imp->p_hash, __osm_clear_tbl_entry,
-		   (st_data_t) NULL);
+	st_foreach(p_domain_imp->p_hash, clear_tbl_entry, (st_data_t) NULL);
 	cl_spinlock_release(&p_domain_imp->lock);
 
 	return 0;
@@ -513,7 +511,7 @@ int osm_db_clear(IN osm_db_domain_t * p_domain)
 
 /***************************************************************************
  ***************************************************************************/
-static int __osm_get_key_of_tbl_entry(st_data_t key, st_data_t val,
+static int get_key_of_tbl_entry(st_data_t key, st_data_t val,
 				      st_data_t arg)
 {
 	cl_list_t *p_list = (cl_list_t *) arg;
@@ -528,8 +526,8 @@ int osm_db_keys(IN osm_db_domain_t * p_domain, OUT cl_list_t * p_key_list)
 
 	cl_spinlock_acquire(&p_domain_imp->lock);
 
-	st_foreach(p_domain_imp->p_hash,
-		   __osm_get_key_of_tbl_entry, (st_data_t) p_key_list);
+	st_foreach(p_domain_imp->p_hash, get_key_of_tbl_entry,
+		   (st_data_t) p_key_list);
 
 	cl_spinlock_release(&p_domain_imp->lock);
 
diff --git a/opensm/opensm/osm_db_pack.c b/opensm/opensm/osm_db_pack.c
index bf56169..a29bdc6 100644
--- a/opensm/opensm/osm_db_pack.c
+++ b/opensm/opensm/osm_db_pack.c
@@ -41,24 +41,24 @@
 #include <complib/cl_debug.h>
 #include <opensm/osm_db_pack.h>
 
-static inline void __osm_pack_guid(uint64_t guid, char *p_guid_str)
+static inline void pack_guid(uint64_t guid, char *p_guid_str)
 {
 	sprintf(p_guid_str, "0x%016" PRIx64, guid);
 }
 
-static inline uint64_t __osm_unpack_guid(char *p_guid_str)
+static inline uint64_t unpack_guid(char *p_guid_str)
 {
 	return strtoull(p_guid_str, NULL, 0);
 }
 
 static inline void
-__osm_pack_lids(uint16_t min_lid, uint16_t max_lid, char *p_lid_str)
+pack_lids(uint16_t min_lid, uint16_t max_lid, char *p_lid_str)
 {
 	sprintf(p_lid_str, "0x%04x 0x%04x", min_lid, max_lid);
 }
 
 static inline int
-__osm_unpack_lids(IN char *p_lid_str,
+unpack_lids(IN char *p_lid_str,
 		  OUT uint16_t * p_min_lid, OUT uint16_t * p_max_lid)
 {
 	unsigned long tmp;
@@ -104,7 +104,7 @@ osm_db_guid2lid_guids(IN osm_db_domain_t * const p_g2l,
 		    (osm_db_guid_elem_t *) malloc(sizeof(osm_db_guid_elem_t));
 		CL_ASSERT(p_guid_elem != NULL);
 
-		p_guid_elem->guid = __osm_unpack_guid(p_key);
+		p_guid_elem->guid = unpack_guid(p_key);
 		cl_qlist_insert_head(p_guid_list, &p_guid_elem->item);
 	}
 
@@ -121,11 +121,11 @@ osm_db_guid2lid_get(IN osm_db_domain_t * const p_g2l,
 	char *p_lid_str;
 	uint16_t min_lid, max_lid;
 
-	__osm_pack_guid(guid, guid_str);
+	pack_guid(guid, guid_str);
 	p_lid_str = osm_db_lookup(p_g2l, guid_str);
 	if (!p_lid_str)
 		return 1;
-	if (__osm_unpack_lids(p_lid_str, &min_lid, &max_lid))
+	if (unpack_lids(p_lid_str, &min_lid, &max_lid))
 		return 1;
 
 	if (p_min_lid)
@@ -143,8 +143,8 @@ osm_db_guid2lid_set(IN osm_db_domain_t * const p_g2l,
 	char guid_str[20];
 	char lid_str[16];
 
-	__osm_pack_guid(guid, guid_str);
-	__osm_pack_lids(min_lid, max_lid, lid_str);
+	pack_guid(guid, guid_str);
+	pack_lids(min_lid, max_lid, lid_str);
 
 	return (osm_db_update(p_g2l, guid_str, lid_str));
 }
@@ -152,6 +152,6 @@ osm_db_guid2lid_set(IN osm_db_domain_t * const p_g2l,
 int osm_db_guid2lid_delete(IN osm_db_domain_t * const p_g2l, IN uint64_t guid)
 {
 	char guid_str[20];
-	__osm_pack_guid(guid, guid_str);
+	pack_guid(guid, guid_str);
 	return (osm_db_delete(p_g2l, guid_str));
 }
diff --git a/opensm/opensm/osm_drop_mgr.c b/opensm/opensm/osm_drop_mgr.c
index 215a155..f994882 100644
--- a/opensm/opensm/osm_drop_mgr.c
+++ b/opensm/opensm/osm_drop_mgr.c
@@ -66,7 +66,7 @@
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_drop_mgr_remove_router(osm_sm_t * sm, IN const ib_net64_t portguid)
+drop_mgr_remove_router(osm_sm_t * sm, IN const ib_net64_t portguid)
 {
 	osm_router_t *p_rtr;
 	cl_qmap_t *p_rtr_guid_tbl;
@@ -153,7 +153,7 @@ static void drop_mgr_clean_physp(osm_sm_t * sm, IN osm_physp_t * p_physp)
 
 /**********************************************************************
  **********************************************************************/
-static void __osm_drop_mgr_remove_port(osm_sm_t * sm, IN osm_port_t * p_port)
+static void drop_mgr_remove_port(osm_sm_t * sm, IN osm_port_t * p_port)
 {
 	ib_net64_t port_guid;
 	osm_port_t *p_port_check;
@@ -197,7 +197,7 @@ static void __osm_drop_mgr_remove_port(osm_sm_t * sm, IN osm_port_t * p_port)
 		free(p_sm);
 	}
 
-	__osm_drop_mgr_remove_router(sm, port_guid);
+	drop_mgr_remove_router(sm, port_guid);
 
 	osm_port_get_lid_range_ho(p_port, &min_lid_ho, &max_lid_ho);
 
@@ -270,7 +270,7 @@ Exit:
 
 /**********************************************************************
  **********************************************************************/
-static void __osm_drop_mgr_remove_switch(osm_sm_t * sm, IN osm_node_t * p_node)
+static void drop_mgr_remove_switch(osm_sm_t * sm, IN osm_node_t * p_node)
 {
 	osm_switch_t *p_sw;
 	cl_qmap_t *p_sw_guid_tbl;
@@ -297,7 +297,7 @@ static void __osm_drop_mgr_remove_switch(osm_sm_t * sm, IN osm_node_t * p_node)
 /**********************************************************************
  **********************************************************************/
 static boolean_t
-__osm_drop_mgr_process_node(osm_sm_t * sm, IN osm_node_t * p_node)
+drop_mgr_process_node(osm_sm_t * sm, IN osm_node_t * p_node)
 {
 	osm_physp_t *p_physp;
 	osm_port_t *p_port;
@@ -329,7 +329,7 @@ __osm_drop_mgr_process_node(osm_sm_t * sm, IN osm_node_t * p_node)
 			p_port = osm_get_port_by_guid(sm->p_subn, port_guid);
 
 			if (p_port)
-				__osm_drop_mgr_remove_port(sm, p_port);
+				drop_mgr_remove_port(sm, p_port);
 			else
 				drop_mgr_clean_physp(sm, p_physp);
 		}
@@ -338,7 +338,7 @@ __osm_drop_mgr_process_node(osm_sm_t * sm, IN osm_node_t * p_node)
 	return_val = TRUE;
 
 	if (p_node->sw)
-		__osm_drop_mgr_remove_switch(sm, p_node);
+		drop_mgr_remove_switch(sm, p_node);
 
 	p_node_check =
 	    (osm_node_t *) cl_qmap_remove(&sm->p_subn->node_guid_tbl,
@@ -358,7 +358,7 @@ __osm_drop_mgr_process_node(osm_sm_t * sm, IN osm_node_t * p_node)
 
 /**********************************************************************
  **********************************************************************/
-static void __osm_drop_mgr_check_node(osm_sm_t * sm, IN osm_node_t * p_node)
+static void drop_mgr_check_node(osm_sm_t * sm, IN osm_node_t * p_node)
 {
 	ib_net64_t node_guid;
 	osm_physp_t *p_physp;
@@ -383,7 +383,7 @@ static void __osm_drop_mgr_check_node(osm_sm_t * sm, IN osm_node_t * p_node)
 			"Node 0x%016" PRIx64 " no switch in table\n",
 			cl_ntoh64(node_guid));
 
-		__osm_drop_mgr_process_node(sm, p_node);
+		drop_mgr_process_node(sm, p_node);
 		goto Exit;
 	}
 
@@ -394,7 +394,7 @@ static void __osm_drop_mgr_check_node(osm_sm_t * sm, IN osm_node_t * p_node)
 			"Node 0x%016" PRIx64 " no valid physical port 0\n",
 			cl_ntoh64(node_guid));
 
-		__osm_drop_mgr_process_node(sm, p_node);
+		drop_mgr_process_node(sm, p_node);
 		goto Exit;
 	}
 
@@ -407,7 +407,7 @@ static void __osm_drop_mgr_check_node(osm_sm_t * sm, IN osm_node_t * p_node)
 			"Node 0x%016" PRIx64 " has no port object\n",
 			cl_ntoh64(node_guid));
 
-		__osm_drop_mgr_process_node(sm, p_node);
+		drop_mgr_process_node(sm, p_node);
 		goto Exit;
 	}
 
@@ -416,7 +416,7 @@ static void __osm_drop_mgr_check_node(osm_sm_t * sm, IN osm_node_t * p_node)
 			"Node 0x%016" PRIx64 " port has discovery count zero\n",
 			cl_ntoh64(node_guid));
 
-		__osm_drop_mgr_process_node(sm, p_node);
+		drop_mgr_process_node(sm, p_node);
 		goto Exit;
 	}
 
@@ -464,7 +464,7 @@ void osm_drop_mgr_process(osm_sm_t * sm)
 		   should therefore be removed from the subnet object.
 		 */
 		if (p_node->discovery_count == 0)
-			__osm_drop_mgr_process_node(sm, p_node);
+			drop_mgr_process_node(sm, p_node);
 	}
 
 	/*
@@ -488,7 +488,7 @@ void osm_drop_mgr_process(osm_sm_t * sm)
 			continue;
 
 		/* We are handling a switch node */
-		__osm_drop_mgr_check_node(sm, p_node);
+		drop_mgr_check_node(sm, p_node);
 	}
 
 	p_next_port = (osm_port_t *) cl_qmap_head(p_port_guid_tbl);
@@ -508,7 +508,7 @@ void osm_drop_mgr_process(osm_sm_t * sm)
 		   If the port is unreachable, remove it from the guid table.
 		 */
 		if (p_port->discovery_count == 0)
-			__osm_drop_mgr_remove_port(sm, p_port);
+			drop_mgr_remove_port(sm, p_port);
 	}
 
 	CL_PLOCK_RELEASE(sm->p_lock);
diff --git a/opensm/opensm/osm_dump.c b/opensm/opensm/osm_dump.c
index 7e0ba47..865899d 100644
--- a/opensm/opensm/osm_dump.c
+++ b/opensm/opensm/osm_dump.c
@@ -130,7 +130,7 @@ static void dump_ucast_routes(cl_map_item_t *p_map_item, FILE *file, void *cxt)
 
 	max_lid_ho = p_sw->max_lid_ho;
 
-	fprintf(file, "__osm_ucast_mgr_dump_ucast_routes: "
+	fprintf(file, "ucast_mgr_dump_ucast_routes: "
 		"Switch 0x%016" PRIx64 "\nLID    : Port : Hops : Optimal\n",
 		cl_ntoh64(osm_node_get_node_guid(p_node)));
 
diff --git a/opensm/opensm/osm_inform.c b/opensm/opensm/osm_inform.c
index dd3f41e..6cc2923 100644
--- a/opensm/opensm/osm_inform.c
+++ b/opensm/opensm/osm_inform.c
@@ -296,8 +296,8 @@ osm_infr_remove_from_db(IN osm_subn_t * p_subn,
  * Given a target address to send to and the notice.
  * We need to send SubnAdmReport
  **********************************************************************/
-static ib_api_status_t __osm_send_report(IN osm_infr_t * p_infr_rec,	/* the informinfo */
-					 IN ib_mad_notice_attr_t * p_ntc	/* notice to send */
+static ib_api_status_t send_report(IN osm_infr_t * p_infr_rec,	/* the informinfo */
+				   IN ib_mad_notice_attr_t * p_ntc	/* notice to send */
     )
 {
 	osm_madw_t *p_report_madw;
@@ -524,7 +524,7 @@ __match_notice_to_inf_rec(IN cl_list_item_t * const p_list_item,
 
 	/* send the report to the address provided in the inform record */
 	OSM_LOG(p_log, OSM_LOG_DEBUG, "MATCH! Sending Report...\n");
-	__osm_send_report(p_infr_rec, p_ntc);
+	send_report(p_infr_rec, p_ntc);
 	status = CL_SUCCESS;
 
 Exit:
diff --git a/opensm/opensm/osm_lid_mgr.c b/opensm/opensm/osm_lid_mgr.c
index e527337..ed384ef 100644
--- a/opensm/opensm/osm_lid_mgr.c
+++ b/opensm/opensm/osm_lid_mgr.c
@@ -47,7 +47,7 @@
  * ALGORITHM:
  *
  * 0. we define a function to obtain the correct port lid:
- *    __osm_lid_mgr_get_port_lid( p_mgr, port, &min_lid ):
+ *    lid_mgr_get_port_lid( p_mgr, port, &min_lid ):
  *    0.1 if the port info lid matches the guid2lid return 0
  *    0.2 if the port info has a lid and that range is empty in
  *        port_lid_tbl, return 0 and update the port_lid_tbl and
@@ -64,12 +64,12 @@
  * 2. During SM port lid assignment:
  *   2.1 if reassign_lids is set, make it 2^lmc
  *   2.2 cleanup all port_lid_tbl and re-fill it according to guid2lid
- *   2.3 call __osm_lid_mgr_get_port_lid the SM port
+ *   2.3 call lid_mgr_get_port_lid the SM port
  *   2.4 set the port info
  *
  * 3. During all other ports lid assignment:
  *   3.1 go through all ports in the subnet
- *   3.1.1 call __osm_lid_mgr_get_port_min_lid
+ *   3.1.1 call lid_mgr_get_port_min_lid
  *   3.1.2 if a change required send the port info
  *   3.2 if any change send the signal PENDING...
  *
@@ -132,7 +132,7 @@ Validate the guid to lid data by making sure that under the current
 LMC we did not get duplicates. If we do flag them as errors and remove
 the entry.
 **********************************************************************/
-static void __osm_lid_mgr_validate_db(IN osm_lid_mgr_t * p_mgr)
+static void lid_mgr_validate_db(IN osm_lid_mgr_t * p_mgr)
 {
 	cl_qlist_t guids;
 	osm_db_guid_elem_t *p_item;
@@ -271,7 +271,7 @@ osm_lid_mgr_init(IN osm_lid_mgr_t * const p_mgr, IN osm_sm_t *sm)
 
 		/* we need to make sure we did not get duplicates with
 		   current lmc */
-		__osm_lid_mgr_validate_db(p_mgr);
+		lid_mgr_validate_db(p_mgr);
 	}
 
 Exit:
@@ -279,7 +279,7 @@ Exit:
 	return (status);
 }
 
-static uint16_t __osm_trim_lid(IN uint16_t lid)
+static uint16_t trim_lid(IN uint16_t lid)
 {
 	if ((lid > IB_LID_UCAST_END_HO) || (lid < IB_LID_UCAST_START_HO))
 		return 0;
@@ -292,7 +292,7 @@ static uint16_t __osm_trim_lid(IN uint16_t lid)
  re-calculate all empty ranges.
  cleanup invalid port_lid_tbl entries
 **********************************************************************/
-static int __osm_lid_mgr_init_sweep(IN osm_lid_mgr_t * const p_mgr)
+static int lid_mgr_init_sweep(IN osm_lid_mgr_t * const p_mgr)
 {
 	cl_ptr_vector_t *p_discovered_vec = &p_mgr->p_subn->port_lid_tbl;
 	uint16_t max_defined_lid;
@@ -371,8 +371,8 @@ static int __osm_lid_mgr_init_sweep(IN osm_lid_mgr_t * const p_mgr)
 	     p_port != (osm_port_t *) cl_qmap_end(p_port_guid_tbl);
 	     p_port = (osm_port_t *) cl_qmap_next(&p_port->map_item)) {
 		osm_port_get_lid_range_ho(p_port, &disc_min_lid, &disc_max_lid);
-		disc_min_lid = __osm_trim_lid(disc_min_lid);
-		disc_max_lid = __osm_trim_lid(disc_max_lid);
+		disc_min_lid = trim_lid(disc_min_lid);
+		disc_max_lid = trim_lid(disc_max_lid);
 		for (lid = disc_min_lid; lid <= disc_max_lid; lid++)
 			cl_ptr_vector_set(p_discovered_vec, lid, p_port);
 		/* make sure the guid2lid entry is valid. If not, clean it. */
@@ -581,9 +581,9 @@ AfterScanningLids:
  check if the given range of lids is free
 **********************************************************************/
 static boolean_t
-__osm_lid_mgr_is_range_not_persistent(IN osm_lid_mgr_t * const p_mgr,
-				      IN const uint16_t lid,
-				      IN const uint16_t num_lids)
+lid_mgr_is_range_not_persistent(IN osm_lid_mgr_t * const p_mgr,
+				IN const uint16_t lid,
+				IN const uint16_t num_lids)
 {
 	uint16_t i;
 	const uint8_t start_lid = (uint8_t) (1 << p_mgr->p_subn->opt.lmc);
@@ -602,10 +602,10 @@ __osm_lid_mgr_is_range_not_persistent(IN osm_lid_mgr_t * const p_mgr,
 find a free lid range
 **********************************************************************/
 static void
-__osm_lid_mgr_find_free_lid_range(IN osm_lid_mgr_t * const p_mgr,
-				  IN const uint8_t num_lids,
-				  OUT uint16_t * const p_min_lid,
-				  OUT uint16_t * const p_max_lid)
+lid_mgr_find_free_lid_range(IN osm_lid_mgr_t * const p_mgr,
+			    IN const uint8_t num_lids,
+			    OUT uint16_t * const p_min_lid,
+			    OUT uint16_t * const p_max_lid)
 {
 	uint16_t lid;
 	cl_list_item_t *p_item;
@@ -667,8 +667,8 @@ __osm_lid_mgr_find_free_lid_range(IN osm_lid_mgr_t * const p_mgr,
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_lid_mgr_cleanup_discovered_port_lid_range(IN osm_lid_mgr_t * p_mgr,
-						IN osm_port_t * p_port)
+lid_mgr_cleanup_discovered_port_lid_range(IN osm_lid_mgr_t * p_mgr,
+					  IN osm_port_t * p_port)
 {
 	cl_ptr_vector_t *p_discovered_vec = &p_mgr->p_subn->port_lid_tbl;
 	uint16_t lid, min_lid, max_lid;
@@ -676,8 +676,8 @@ __osm_lid_mgr_cleanup_discovered_port_lid_range(IN osm_lid_mgr_t * p_mgr,
 	    (uint16_t) (cl_ptr_vector_get_size(p_discovered_vec));
 
 	osm_port_get_lid_range_ho(p_port, &min_lid, &max_lid);
-	min_lid = __osm_trim_lid(min_lid);
-	max_lid = __osm_trim_lid(max_lid);
+	min_lid = trim_lid(min_lid);
+	max_lid = trim_lid(max_lid);
 	for (lid = min_lid; lid <= max_lid; lid++) {
 		if ((lid < max_tbl_lid) &&
 		    (p_port ==
@@ -695,10 +695,10 @@ __osm_lid_mgr_cleanup_discovered_port_lid_range(IN osm_lid_mgr_t * p_mgr,
  port_lid_tbl and guid2lid, return 1 to flag a change required.
 **********************************************************************/
 static int
-__osm_lid_mgr_get_port_lid(IN osm_lid_mgr_t * const p_mgr,
-			   IN osm_port_t * const p_port,
-			   OUT uint16_t * const p_min_lid,
-			   OUT uint16_t * const p_max_lid)
+lid_mgr_get_port_lid(IN osm_lid_mgr_t * const p_mgr,
+		     IN osm_port_t * const p_port,
+		     OUT uint16_t * const p_min_lid,
+		     OUT uint16_t * const p_max_lid)
 {
 	uint16_t lid, min_lid, max_lid;
 	uint64_t guid;
@@ -736,8 +736,7 @@ __osm_lid_mgr_get_port_lid(IN osm_lid_mgr_t * const p_mgr,
 				"does not match its known lid:%u\n",
 				guid, cl_ntoh16(osm_port_get_base_lid(p_port)),
 				min_lid);
-			__osm_lid_mgr_cleanup_discovered_port_lid_range(p_mgr,
-									p_port);
+			lid_mgr_cleanup_discovered_port_lid_range(p_mgr, p_port);
 			/* we still need to send the setting to the target port */
 			lid_changed = 1;
 			goto Exit;
@@ -757,7 +756,7 @@ __osm_lid_mgr_get_port_lid(IN osm_lid_mgr_t * const p_mgr,
 		/* make sure lid is valid */
 		if ((min_lid & lmc_mask) == min_lid) {
 			/* is it free */
-			if (__osm_lid_mgr_is_range_not_persistent
+			if (lid_mgr_is_range_not_persistent
 			    (p_mgr, min_lid, num_lids)) {
 				*p_min_lid = min_lid;
 				*p_max_lid = min_lid + num_lids - 1;
@@ -780,11 +779,10 @@ __osm_lid_mgr_get_port_lid(IN osm_lid_mgr_t * const p_mgr,
 
 AssignLid:
 	/* first cleanup the existing discovered lid range */
-	__osm_lid_mgr_cleanup_discovered_port_lid_range(p_mgr, p_port);
+	lid_mgr_cleanup_discovered_port_lid_range(p_mgr, p_port);
 
 	/* find an empty space */
-	__osm_lid_mgr_find_free_lid_range(p_mgr, num_lids, p_min_lid,
-					  p_max_lid);
+	lid_mgr_find_free_lid_range(p_mgr, num_lids, p_min_lid, p_max_lid);
 	OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 		"0x%016" PRIx64 " assigned a new lid range:[%u-%u]\n",
 		guid, *p_min_lid, *p_max_lid);
@@ -809,8 +807,8 @@ Exit:
  Set to INIT the remote port of the given physical port
  **********************************************************************/
 static void
-__osm_lid_mgr_set_remote_pi_state_to_init(IN osm_lid_mgr_t * const p_mgr,
-					  IN osm_physp_t * const p_physp)
+lid_mgr_set_remote_pi_state_to_init(IN osm_lid_mgr_t * const p_mgr,
+				    IN osm_physp_t * const p_physp)
 {
 	osm_physp_t *p_rem_physp = osm_physp_get_remote(p_physp);
 
@@ -824,10 +822,10 @@ __osm_lid_mgr_set_remote_pi_state_to_init(IN osm_lid_mgr_t * const p_mgr,
 /**********************************************************************
  **********************************************************************/
 static boolean_t
-__osm_lid_mgr_set_physp_pi(IN osm_lid_mgr_t * const p_mgr,
-			   IN osm_port_t * const p_port,
-			   IN osm_physp_t * const p_physp,
-			   IN ib_net16_t const lid)
+lid_mgr_set_physp_pi(IN osm_lid_mgr_t * const p_mgr,
+		     IN osm_port_t * const p_port,
+		     IN osm_physp_t * const p_physp,
+		     IN ib_net16_t const lid)
 {
 	uint8_t payload[IB_SMP_DATA_SIZE];
 	ib_port_info_t *p_pi = (ib_port_info_t *) payload;
@@ -1002,8 +1000,7 @@ __osm_lid_mgr_set_physp_pi(IN osm_lid_mgr_t * const p_mgr,
 			   fact that the remote port is also going through
 			   "down" state into "init"...
 			 */
-			__osm_lid_mgr_set_remote_pi_state_to_init(p_mgr,
-								  p_physp);
+			lid_mgr_set_remote_pi_state_to_init(p_mgr, p_physp);
 
 			ib_port_info_set_port_state(p_pi, IB_LINK_DOWN);
 			if (ib_port_info_get_port_state(p_pi) !=
@@ -1093,7 +1090,7 @@ Exit:
  Lock must already be held.
 **********************************************************************/
 static boolean_t
-__osm_lid_mgr_process_our_sm_node(IN osm_lid_mgr_t * const p_mgr)
+lid_mgr_process_our_sm_node(IN osm_lid_mgr_t * const p_mgr)
 {
 	osm_port_t *p_port;
 	uint16_t min_lid_ho;
@@ -1123,7 +1120,7 @@ __osm_lid_mgr_process_our_sm_node(IN osm_lid_mgr_t * const p_mgr)
 	   configure the SM with a LID that has non-zero bits, even after
 	   LMC masking by hardware.
 	 */
-	__osm_lid_mgr_get_port_lid(p_mgr, p_port, &min_lid_ho, &max_lid_ho);
+	lid_mgr_get_port_lid(p_mgr, p_port, &min_lid_ho, &max_lid_ho);
 	OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 		"Current base LID is %u\n", min_lid_ho);
 	/*
@@ -1140,8 +1137,8 @@ __osm_lid_mgr_process_our_sm_node(IN osm_lid_mgr_t * const p_mgr)
 	/*
 	   Set the PortInfo the Physical Port associated with this Port.
 	 */
-	__osm_lid_mgr_set_physp_pi(p_mgr, p_port, p_port->p_physp,
-				   cl_hton16(min_lid_ho));
+	lid_mgr_set_physp_pi(p_mgr, p_port, p_port->p_physp,
+			     cl_hton16(min_lid_ho));
 
 Exit:
 	OSM_LOG_EXIT(p_mgr->p_log);
@@ -1162,13 +1159,13 @@ osm_signal_t osm_lid_mgr_process_sm(IN osm_lid_mgr_t * const p_mgr)
 
 	/* initialize the port_lid_tbl and empty ranges list following the
 	   persistent db */
-	__osm_lid_mgr_init_sweep(p_mgr);
+	lid_mgr_init_sweep(p_mgr);
 
 	/* Set the send_set_reqs of the p_mgr to FALSE, and
 	   we'll see if any set requests were sent. If not -
 	   can signal OSM_SIGNAL_DONE */
 	p_mgr->send_set_reqs = FALSE;
-	if (__osm_lid_mgr_process_our_sm_node(p_mgr) == FALSE)
+	if (lid_mgr_process_our_sm_node(p_mgr) == FALSE)
 		/* The initialization failed */
 		signal = OSM_SIGNAL_DONE;
 
@@ -1183,7 +1180,7 @@ osm_signal_t osm_lid_mgr_process_sm(IN osm_lid_mgr_t * const p_mgr)
 
 /**********************************************************************
  1 go through all ports in the subnet.
- 1.1 call __osm_lid_mgr_get_port_min_lid
+ 1.1 call lid_mgr_get_port_min_lid
  1.2 if a change is required send the port info
  2 if any change send the signal PENDING...
 **********************************************************************/
@@ -1234,11 +1231,10 @@ osm_signal_t osm_lid_mgr_process_subnet(IN osm_lid_mgr_t * const p_mgr)
 		/*
 		   get the port lid range - we need to send it on first active
 		   sweep or if there was a change (the result of
-		   __osm_lid_mgr_get_port_lid)
+		   lid_mgr_get_port_lid)
 		 */
 		lid_changed =
-		    __osm_lid_mgr_get_port_lid(p_mgr, p_port, &min_lid_ho,
-					       &max_lid_ho);
+		    lid_mgr_get_port_lid(p_mgr, p_port, &min_lid_ho, &max_lid_ho);
 
 		/* we can call the function to update the port info as it known
 		   to look for any field change and will only send an updated
@@ -1249,7 +1245,7 @@ osm_signal_t osm_lid_mgr_process_subnet(IN osm_lid_mgr_t * const p_mgr)
 			min_lid_ho, max_lid_ho);
 
 		/* the proc returns the fact it sent a set port info */
-		if (__osm_lid_mgr_set_physp_pi
+		if (lid_mgr_set_physp_pi
 		    (p_mgr, p_port, p_port->p_physp, cl_hton16(min_lid_ho)))
 			p_mgr->send_set_reqs = TRUE;
 	}			/* all ports */
diff --git a/opensm/opensm/osm_mcast_mgr.c b/opensm/opensm/osm_mcast_mgr.c
index e42be7b..3307e26 100644
--- a/opensm/opensm/osm_mcast_mgr.c
+++ b/opensm/opensm/osm_mcast_mgr.c
@@ -65,8 +65,7 @@ typedef struct osm_mcast_work_obj {
 
 /**********************************************************************
  **********************************************************************/
-static osm_mcast_work_obj_t *__osm_mcast_work_obj_new(IN const osm_port_t *
-						      const p_port)
+static osm_mcast_work_obj_t *mcast_work_obj_new(IN const osm_port_t * const p_port)
 {
 	osm_mcast_work_obj_t *p_obj;
 
@@ -86,7 +85,7 @@ static osm_mcast_work_obj_t *__osm_mcast_work_obj_new(IN const osm_port_t *
 
 /**********************************************************************
  **********************************************************************/
-static void __osm_mcast_work_obj_delete(IN osm_mcast_work_obj_t * p_wobj)
+static void mcast_work_obj_delete(IN osm_mcast_work_obj_t * p_wobj)
 {
 	free(p_wobj);
 }
@@ -94,14 +93,14 @@ static void __osm_mcast_work_obj_delete(IN osm_mcast_work_obj_t * p_wobj)
 /**********************************************************************
  Recursively remove nodes from the tree
  *********************************************************************/
-static void __osm_mcast_mgr_purge_tree_node(IN osm_mtree_node_t * p_mtn)
+static void mcast_mgr_purge_tree_node(IN osm_mtree_node_t * p_mtn)
 {
 	uint8_t i;
 
 	for (i = 0; i < p_mtn->max_children; i++) {
 		if (p_mtn->child_array[i] &&
 		    (p_mtn->child_array[i] != OSM_MTREE_LEAF))
-			__osm_mcast_mgr_purge_tree_node(p_mtn->child_array[i]);
+			mcast_mgr_purge_tree_node(p_mtn->child_array[i]);
 
 		p_mtn->child_array[i] = NULL;
 
@@ -113,12 +112,12 @@ static void __osm_mcast_mgr_purge_tree_node(IN osm_mtree_node_t * p_mtn)
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_mcast_mgr_purge_tree(osm_sm_t * sm, IN osm_mgrp_t * const p_mgrp)
+mcast_mgr_purge_tree(osm_sm_t * sm, IN osm_mgrp_t * const p_mgrp)
 {
 	OSM_LOG_ENTER(sm->p_log);
 
 	if (p_mgrp->p_root)
-		__osm_mcast_mgr_purge_tree_node(p_mgrp->p_root);
+		mcast_mgr_purge_tree_node(p_mgrp->p_root);
 
 	p_mgrp->p_root = NULL;
 
@@ -248,9 +247,8 @@ osm_mcast_mgr_compute_max_hops(osm_sm_t * sm,
    a switch with the lowest average hop count to the members
    of the multicast group.
 **********************************************************************/
-static osm_switch_t *__osm_mcast_mgr_find_optimal_switch(osm_sm_t * sm,
-							 const osm_mgrp_t *
-							 const p_mgrp)
+static osm_switch_t *mcast_mgr_find_optimal_switch(osm_sm_t * sm,
+						   const osm_mgrp_t * const p_mgrp)
 {
 	cl_qmap_t *p_sw_tbl;
 	const osm_switch_t *p_sw;
@@ -306,9 +304,8 @@ static osm_switch_t *__osm_mcast_mgr_find_optimal_switch(osm_sm_t * sm,
 /**********************************************************************
    This function returns the existing or optimal root swtich for the tree.
 **********************************************************************/
-static osm_switch_t *__osm_mcast_mgr_find_root_switch(osm_sm_t * sm,
-						      const osm_mgrp_t *
-						      const p_mgrp)
+static osm_switch_t *mcast_mgr_find_root_switch(osm_sm_t * sm,
+						const osm_mgrp_t * const p_mgrp)
 {
 	const osm_switch_t *p_sw = NULL;
 
@@ -320,7 +317,7 @@ static osm_switch_t *__osm_mcast_mgr_find_root_switch(osm_sm_t * sm,
 	   the root will be always on the first switch attached to it.
 	   - Very bad ...
 	 */
-	p_sw = __osm_mcast_mgr_find_optimal_switch(sm, p_mgrp);
+	p_sw = mcast_mgr_find_optimal_switch(sm, p_mgrp);
 
 	OSM_LOG_EXIT(sm->p_log);
 	return ((osm_switch_t *) p_sw);
@@ -329,7 +326,7 @@ static osm_switch_t *__osm_mcast_mgr_find_root_switch(osm_sm_t * sm,
 /**********************************************************************
  **********************************************************************/
 static osm_signal_t
-__osm_mcast_mgr_set_tbl(osm_sm_t * sm, IN osm_switch_t * const p_sw)
+mcast_mgr_set_tbl(osm_sm_t * sm, IN osm_switch_t * const p_sw)
 {
 	osm_node_t *p_node;
 	osm_dr_path_t *p_path;
@@ -403,12 +400,9 @@ __osm_mcast_mgr_set_tbl(osm_sm_t * sm, IN osm_switch_t * const p_sw)
   contains the group members that must be routed from this switch.
 **********************************************************************/
 static void
-__osm_mcast_mgr_subdivide(osm_sm_t * sm,
-			  osm_mgrp_t * const p_mgrp,
-			  osm_switch_t * const p_sw,
-			  cl_qlist_t * const p_list,
-			  cl_qlist_t * const list_array,
-			  uint8_t const array_size)
+mcast_mgr_subdivide(osm_sm_t * sm, osm_mgrp_t * const p_mgrp,
+		    osm_switch_t * const p_sw, cl_qlist_t * const p_list,
+		    cl_qlist_t * const list_array, uint8_t const array_size)
 {
 	uint8_t port_num;
 	uint16_t mlid_ho;
@@ -453,7 +447,7 @@ __osm_mcast_mgr_subdivide(osm_sm_t * sm,
 				cl_ntoh16(osm_port_get_base_lid
 					  (p_wobj->p_port)));
 
-			__osm_mcast_work_obj_delete(p_wobj);
+			mcast_work_obj_delete(p_wobj);
 			continue;
 		}
 
@@ -468,7 +462,7 @@ __osm_mcast_mgr_subdivide(osm_sm_t * sm,
 				cl_ntoh16(osm_port_get_base_lid
 					  (p_wobj->p_port)));
 
-			__osm_mcast_work_obj_delete(p_wobj);
+			mcast_work_obj_delete(p_wobj);
 
 			/* This is means OpenSM has a bug. */
 			CL_ASSERT(FALSE);
@@ -483,7 +477,7 @@ __osm_mcast_mgr_subdivide(osm_sm_t * sm,
 
 /**********************************************************************
  **********************************************************************/
-static void __osm_mcast_mgr_purge_list(osm_sm_t * sm, cl_qlist_t * const p_list)
+static void mcast_mgr_purge_list(osm_sm_t * sm, cl_qlist_t * const p_list)
 {
 	osm_mcast_work_obj_t *p_wobj;
 
@@ -494,7 +488,7 @@ static void __osm_mcast_mgr_purge_list(osm_sm_t * sm, cl_qlist_t * const p_list)
 		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A06: "
 			"Unable to route for port 0x%" PRIx64 "\n",
 			osm_port_get_guid(p_wobj->p_port));
-		__osm_mcast_work_obj_delete(p_wobj);
+		mcast_work_obj_delete(p_wobj);
 	}
 
 	OSM_LOG_EXIT(sm->p_log);
@@ -507,13 +501,13 @@ static void __osm_mcast_mgr_purge_list(osm_sm_t * sm, cl_qlist_t * const p_list)
 
   The function returns the newly created mtree node element.
 **********************************************************************/
-static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
-						osm_mgrp_t * const p_mgrp,
-						osm_switch_t * const p_sw,
-						cl_qlist_t * const p_list,
-						uint8_t depth,
-						uint8_t const upstream_port,
-						uint8_t * const p_max_depth)
+static osm_mtree_node_t *mcast_mgr_branch(osm_sm_t * sm,
+					  osm_mgrp_t * const p_mgrp,
+					  osm_switch_t * const p_sw,
+					  cl_qlist_t * const p_list,
+					  uint8_t depth,
+					  uint8_t const upstream_port,
+					  uint8_t * const p_max_depth)
 {
 	uint8_t max_children;
 	osm_mtree_node_t *p_mtn = NULL;
@@ -550,7 +544,7 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 		OSM_LOG(sm->p_log, OSM_LOG_ERROR,
 			"Maximal hops number is reached for MLID 0x%x."
 			" Break processing.", mlid_ho);
-		__osm_mcast_mgr_purge_list(sm, p_list);
+		mcast_mgr_purge_list(sm, p_list);
 		goto Exit;
 	}
 
@@ -570,7 +564,7 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 		/*
 		   Deallocate all the work objects on this branch of the tree.
 		 */
-		__osm_mcast_mgr_purge_list(sm, p_list);
+		mcast_mgr_purge_list(sm, p_list);
 		goto Exit;
 	}
 
@@ -586,7 +580,7 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 		/*
 		   Deallocate all the work objects on this branch of the tree.
 		 */
-		__osm_mcast_mgr_purge_list(sm, p_list);
+		mcast_mgr_purge_list(sm, p_list);
 		goto Exit;
 	}
 
@@ -603,7 +597,7 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 	if (list_array == NULL) {
 		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A16: "
 			"Unable to allocate list array\n");
-		__osm_mcast_mgr_purge_list(sm, p_list);
+		mcast_mgr_purge_list(sm, p_list);
 		goto Exit;
 	}
 
@@ -612,8 +606,7 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 	for (i = 0; i < max_children; i++)
 		cl_qlist_init(&list_array[i]);
 
-	__osm_mcast_mgr_subdivide(sm, p_mgrp, p_sw, p_list, list_array,
-				  max_children);
+	mcast_mgr_subdivide(sm, p_mgrp, p_sw, p_list, list_array, max_children);
 
 	p_tbl = osm_switch_get_mcast_tbl_ptr(p_sw);
 
@@ -674,7 +667,7 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 
 			p_wobj = (osm_mcast_work_obj_t *)
 			    cl_qlist_remove_head(p_port_list);
-			__osm_mcast_work_obj_delete(p_wobj);
+			mcast_work_obj_delete(p_wobj);
 			continue;
 		}
 
@@ -696,12 +689,10 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 			CL_ASSERT(p_remote_physp);
 
 			p_mtn->child_array[i] =
-			    __osm_mcast_mgr_branch(sm, p_mgrp,
-						   p_remote_node->sw,
-						   p_port_list, depth,
-						   osm_physp_get_port_num
-						   (p_remote_physp),
-						   p_max_depth);
+			    mcast_mgr_branch(sm, p_mgrp, p_remote_node->sw,
+					     p_port_list, depth,
+					     osm_physp_get_port_num(p_remote_physp),
+					     p_max_depth);
 		} else {
 			/*
 			   The neighbor node is not a switch, so this
@@ -721,7 +712,7 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 				cl_ntoh64(osm_port_get_guid(p_wobj->p_port)),
 				i);
 
-			__osm_mcast_work_obj_delete(p_wobj);
+			mcast_work_obj_delete(p_wobj);
 		}
 	}
 
@@ -734,7 +725,7 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static ib_api_status_t
-__osm_mcast_mgr_build_spanning_tree(osm_sm_t * sm, osm_mgrp_t * const p_mgrp)
+mcast_mgr_build_spanning_tree(osm_sm_t * sm, osm_mgrp_t * const p_mgrp)
 {
 	const cl_qmap_t *p_mcm_tbl;
 	const osm_port_t *p_port;
@@ -757,7 +748,7 @@ __osm_mcast_mgr_build_spanning_tree(osm_sm_t * sm, osm_mgrp_t * const p_mgrp)
 	   on multicast forwarding table information if the user wants to
 	   preserve existing multicast routes.
 	 */
-	__osm_mcast_mgr_purge_tree(sm, p_mgrp);
+	mcast_mgr_purge_tree(sm, p_mgrp);
 
 	p_mcm_tbl = &p_mgrp->mcm_port_tbl;
 	num_ports = cl_qmap_count(p_mcm_tbl);
@@ -784,7 +775,7 @@ __osm_mcast_mgr_build_spanning_tree(osm_sm_t * sm, osm_mgrp_t * const p_mgrp)
 	   Locate the switch around which to create the spanning
 	   tree for this multicast group.
 	 */
-	p_sw = __osm_mcast_mgr_find_root_switch(sm, p_mgrp);
+	p_sw = mcast_mgr_find_root_switch(sm, p_mgrp);
 	if (p_sw == NULL) {
 		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A08: "
 			"Unable to locate a suitable switch for group 0x%X\n",
@@ -815,7 +806,7 @@ __osm_mcast_mgr_build_spanning_tree(osm_sm_t * sm, osm_mgrp_t * const p_mgrp)
 			continue;
 		}
 
-		p_wobj = __osm_mcast_work_obj_new(p_port);
+		p_wobj = mcast_work_obj_new(p_port);
 		if (p_wobj == NULL) {
 			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A10: "
 				"Insufficient memory to route port 0x%016"
@@ -828,7 +819,7 @@ __osm_mcast_mgr_build_spanning_tree(osm_sm_t * sm, osm_mgrp_t * const p_mgrp)
 	}
 
 	count = cl_qlist_count(&port_list);
-	p_mgrp->p_root = __osm_mcast_mgr_branch(sm, p_mgrp, p_sw,
+	p_mgrp->p_root = mcast_mgr_branch(sm, p_mgrp, p_sw,
 						&port_list, 0, 0, &max_depth);
 
 	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
@@ -892,7 +883,7 @@ osm_mcast_mgr_set_table(osm_sm_t * sm,
 
 /**********************************************************************
  **********************************************************************/
-static void __osm_mcast_mgr_clear(osm_sm_t * sm, uint16_t mlid)
+static void mcast_mgr_clear(osm_sm_t * sm, uint16_t mlid)
 {
 	osm_switch_t *p_sw;
 	cl_qmap_t *p_sw_tbl;
@@ -1069,12 +1060,12 @@ osm_mcast_mgr_process_tree(osm_sm_t * sm, IN osm_mgrp_t * const p_mgrp)
 	   the spanning tree which sets the mcast table bits for each
 	   port in the group.
 	 */
-	__osm_mcast_mgr_clear(sm, cl_ntoh16(mlid));
+	mcast_mgr_clear(sm, cl_ntoh16(mlid));
 
 	if (!p_mgrp->full_members)
 		goto Exit;
 
-	status = __osm_mcast_mgr_build_spanning_tree(sm, p_mgrp);
+	status = mcast_mgr_build_spanning_tree(sm, p_mgrp);
 	if (status != IB_SUCCESS) {
 		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A17: "
 			"Unable to create spanning tree (%s)\n",
@@ -1161,7 +1152,7 @@ osm_signal_t osm_mcast_mgr_process(osm_sm_t * sm)
 	 */
 	p_sw = (osm_switch_t *) cl_qmap_head(p_sw_tbl);
 	while (p_sw != (osm_switch_t *) cl_qmap_end(p_sw_tbl)) {
-		signal = __osm_mcast_mgr_set_tbl(sm, p_sw);
+		signal = mcast_mgr_set_tbl(sm, p_sw);
 		if (signal == OSM_SIGNAL_DONE_PENDING)
 			pending_transactions = TRUE;
 		p_sw = (osm_switch_t *) cl_qmap_next(&p_sw->map_item);
@@ -1238,7 +1229,7 @@ osm_signal_t osm_mcast_mgr_process_mgroups(osm_sm_t * sm)
 	p_sw_tbl = &sm->p_subn->sw_guid_tbl;
 	p_sw = (osm_switch_t *) cl_qmap_head(p_sw_tbl);
 	while (p_sw != (osm_switch_t *) cl_qmap_end(p_sw_tbl)) {
-		ret = __osm_mcast_mgr_set_tbl(sm, p_sw);
+		ret = mcast_mgr_set_tbl(sm, p_sw);
 		if (ret == OSM_SIGNAL_DONE_PENDING)
 			signal = ret;
 		p_sw = (osm_switch_t *) cl_qmap_next(&p_sw->map_item);
diff --git a/opensm/opensm/osm_multicast.c b/opensm/opensm/osm_multicast.c
index 350fd22..5c1a0d7 100644
--- a/opensm/opensm/osm_multicast.c
+++ b/opensm/opensm/osm_multicast.c
@@ -264,9 +264,9 @@ osm_mgrp_is_port_present(IN const osm_mgrp_t * const p_mgrp,
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_mgrp_apply_func_sub(const osm_mgrp_t * const p_mgrp,
-			  const osm_mtree_node_t * const p_mtn,
-			  osm_mgrp_func_t p_func, void *context)
+mgrp_apply_func_sub(const osm_mgrp_t * const p_mgrp,
+		    const osm_mtree_node_t * const p_mtn,
+		    osm_mgrp_func_t p_func, void *context)
 {
 	uint8_t i = 0;
 	uint8_t max_children;
@@ -279,8 +279,8 @@ __osm_mgrp_apply_func_sub(const osm_mgrp_t * const p_mgrp,
 	for (i = 0; i < max_children; i++) {
 		p_child_mtn = osm_mtree_node_get_child(p_mtn, i);
 		if (p_child_mtn)
-			__osm_mgrp_apply_func_sub(p_mgrp, p_child_mtn, p_func,
-						  context);
+			mgrp_apply_func_sub(p_mgrp, p_child_mtn, p_func,
+					    context);
 	}
 }
 
@@ -298,5 +298,5 @@ osm_mgrp_apply_func(const osm_mgrp_t * const p_mgrp,
 	p_mtn = p_mgrp->p_root;
 
 	if (p_mtn)
-		__osm_mgrp_apply_func_sub(p_mgrp, p_mtn, p_func, context);
+		mgrp_apply_func_sub(p_mgrp, p_mtn, p_func, context);
 }
diff --git a/opensm/opensm/osm_pkey.c b/opensm/opensm/osm_pkey.c
index 4666186..1128172 100644
--- a/opensm/opensm/osm_pkey.c
+++ b/opensm/opensm/osm_pkey.c
@@ -287,7 +287,7 @@ osm_pkey_tbl_get_block_and_idx(IN osm_pkey_tbl_t * p_pkey_tbl,
 /**********************************************************************
  **********************************************************************/
 static boolean_t
-__osm_match_pkey(IN const ib_net16_t * pkey1, IN const ib_net16_t * pkey2)
+match_pkey(IN const ib_net16_t * pkey1, IN const ib_net16_t * pkey2)
 {
 
 	/* if both pkeys are not full member - this is not a match */
@@ -315,7 +315,7 @@ osm_physp_share_this_pkey(IN const osm_physp_t * const p_physp1,
 			   ib_pkey_get_base(pkey));
 	pkey2 = cl_map_get(&(osm_physp_get_pkey_tbl(p_physp2))->keys,
 			   ib_pkey_get_base(pkey));
-	return (pkey1 && pkey2 && __osm_match_pkey(pkey1, pkey2));
+	return (pkey1 && pkey2 && match_pkey(pkey1, pkey2));
 }
 
 /**********************************************************************
@@ -341,7 +341,7 @@ osm_physp_find_common_pkey(IN const osm_physp_t * const p_physp1,
 		pkey1 = (ib_net16_t *) cl_map_obj(map_iter1);
 		pkey2 = (ib_net16_t *) cl_map_obj(map_iter2);
 
-		if (__osm_match_pkey(pkey1, pkey2))
+		if (match_pkey(pkey1, pkey2))
 			return *pkey1;
 
 		/* advance the lower value if they are not equal */
diff --git a/opensm/opensm/osm_port.c b/opensm/opensm/osm_port.c
index ade85c0..34b5688 100644
--- a/opensm/opensm/osm_port.c
+++ b/opensm/opensm/osm_port.c
@@ -249,8 +249,8 @@ osm_port_add_mgrp(IN osm_port_t * const p_port, IN const ib_net16_t mlid)
 /**********************************************************************
  **********************************************************************/
 static cl_status_t
-__osm_port_mgrp_find_func(IN const cl_list_item_t * const p_list_item,
-			  IN void *context)
+port_mgrp_find_func(IN const cl_list_item_t * const p_list_item,
+		    IN void *context)
 {
 	if (*((ib_net16_t *) context) == ((osm_mcm_info_t *) p_list_item)->mlid)
 		return (CL_SUCCESS);
@@ -265,8 +265,8 @@ osm_port_remove_mgrp(IN osm_port_t * const p_port, IN const ib_net16_t mlid)
 {
 	cl_list_item_t *p_mcm;
 
-	p_mcm = cl_qlist_find_from_head(&p_port->mcm_list,
-					__osm_port_mgrp_find_func, &mlid);
+	p_mcm = cl_qlist_find_from_head(&p_port->mcm_list, port_mgrp_find_func,
+					&mlid);
 
 	if (p_mcm != cl_qlist_end(&p_port->mcm_list)) {
 		cl_qlist_remove_item(&p_port->mcm_list, p_mcm);
@@ -399,7 +399,7 @@ osm_physp_calc_link_op_vls(IN osm_log_t * p_log,
 	return (op_vls);
 }
 
-static inline uint64_t __osm_ptr_to_key(void const *p)
+static inline uint64_t ptr_to_key(void const *p)
 {
 	uint64_t k = 0;
 
@@ -407,7 +407,7 @@ static inline uint64_t __osm_ptr_to_key(void const *p)
 	return k;
 }
 
-static inline void *__osm_key_to_ptr(uint64_t k)
+static inline void *key_to_ptr(uint64_t k)
 {
 	void *p = 0;
 
@@ -421,10 +421,9 @@ static inline void *__osm_key_to_ptr(uint64_t k)
  last phys ports (going into the first switch and into the target port).
  **********************************************************************/
 static cl_status_t
-__osm_physp_get_dr_physp_set(IN osm_log_t * p_log,
-			     IN osm_subn_t const *p_subn,
-			     IN osm_dr_path_t const *p_path,
-			     OUT cl_map_t * p_physp_map)
+physp_get_dr_physp_set(IN osm_log_t * p_log, IN osm_subn_t const *p_subn,
+		       IN osm_dr_path_t const *p_path,
+		       OUT cl_map_t * p_physp_map)
 {
 	osm_port_t *p_port;
 	osm_physp_t *p_physp;
@@ -466,8 +465,7 @@ __osm_physp_get_dr_physp_set(IN osm_log_t * p_log,
 
 		/* we track the ports we go out along the path */
 		if (hop > 1)
-			cl_map_insert(p_physp_map, __osm_ptr_to_key(p_physp),
-				      NULL);
+			cl_map_insert(p_physp_map, ptr_to_key(p_physp), NULL);
 
 		OSM_LOG(p_log, OSM_LOG_DEBUG,
 			"Traversed through node: 0x%016" PRIx64
@@ -494,9 +492,9 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_physp_update_new_dr_path(IN osm_physp_t const *p_dest_physp,
-			       IN cl_map_t * p_visited_map,
-			       IN osm_bind_handle_t * h_bind)
+physp_update_new_dr_path(IN osm_physp_t const *p_dest_physp,
+			 IN cl_map_t * p_visited_map,
+			 IN osm_bind_handle_t * h_bind)
 {
 	cl_list_t tmpPortsList;
 	osm_physp_t *p_physp, *p_src_physp = NULL;
@@ -510,20 +508,20 @@ __osm_physp_update_new_dr_path(IN osm_physp_t const *p_dest_physp,
 	cl_list_insert_head(&tmpPortsList, p_dest_physp);
 	/* get the output port where we need to come from */
 	p_physp = (osm_physp_t *) cl_map_get(p_visited_map,
-					     __osm_ptr_to_key(p_dest_physp));
+					     ptr_to_key(p_dest_physp));
 	while (p_physp != NULL) {
 		cl_list_insert_head(&tmpPortsList, p_physp);
 		/* get the input port through where we reached the output port */
 		p_src_physp = p_physp;
 		p_physp = (osm_physp_t *) cl_map_get(p_visited_map,
-						     __osm_ptr_to_key(p_physp));
+						     ptr_to_key(p_physp));
 		/* if we reached a null p_physp - this means we are at the begining
 		   of the path. Break. */
 		if (p_physp == NULL)
 			break;
 		/* get the output port */
 		p_physp = (osm_physp_t *) cl_map_get(p_visited_map,
-						     __osm_ptr_to_key(p_physp));
+						     ptr_to_key(p_physp));
 	}
 
 	memset(path_array, 0, sizeof(path_array));
@@ -574,7 +572,7 @@ osm_physp_replace_dr_path_with_alternate_dr_path(IN osm_log_t * p_log,
 	cl_map_construct(&visited_map);
 	cl_map_init(&visited_map, 4);
 	p_dr_path = osm_physp_get_dr_path_ptr(p_dest_physp);
-	__osm_physp_get_dr_physp_set(p_log, p_subn, p_dr_path, &physp_map);
+	physp_get_dr_physp_set(p_log, p_subn, p_dr_path, &physp_map);
 
 	/*
 	   BFS from OSM port until we find the target physp but avoid
@@ -643,21 +641,20 @@ osm_physp_replace_dr_path_with_alternate_dr_path(IN osm_log_t * p_log,
 				if (p_remote_physp &&
 				    p_remote_physp != p_physp &&
 				    cl_map_get(&physp_map,
-					       __osm_ptr_to_key(p_remote_physp))
+					       ptr_to_key(p_remote_physp))
 				    == NULL
 				    && cl_map_get(&visited_map,
-						  __osm_ptr_to_key
-						  (p_remote_physp)) == NULL) {
+						  ptr_to_key(p_remote_physp))
+						  == NULL) {
 					/* Insert the port into the visited_map, and save its source port */
 					cl_map_insert(&visited_map,
-						      __osm_ptr_to_key
-						      (p_remote_physp),
+						      ptr_to_key(p_remote_physp),
 						      p_physp);
 
 					/* Is this the p_dest_physp? */
 					if (p_remote_physp == p_dest_physp) {
 						/* update the new dr path */
-						__osm_physp_update_new_dr_path
+						physp_update_new_dr_path
 						    (p_dest_physp, &visited_map,
 						     h_bind);
 						reached_dest = TRUE;
diff --git a/opensm/opensm/osm_sa_class_port_info.c b/opensm/opensm/osm_sa_class_port_info.c
index a3a2782..776e698 100644
--- a/opensm/opensm/osm_sa_class_port_info.c
+++ b/opensm/opensm/osm_sa_class_port_info.c
@@ -69,8 +69,7 @@ const static uint32_t __msecs_to_rtv_table[MAX_MSECS_TO_RTV] = {
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_cpi_rcv_respond(IN osm_sa_t * sa,
-		      IN const osm_madw_t * const p_madw)
+cpi_rcv_respond(IN osm_sa_t * sa, IN const osm_madw_t * const p_madw)
 {
 	osm_madw_t *p_resp_madw;
 	const ib_sa_mad_t *p_sa_mad;
@@ -202,11 +201,9 @@ void osm_cpi_rcv_process(IN void *context, IN void *data)
 
 	CL_ASSERT(p_sa_mad->attr_id == IB_MAD_ATTR_CLASS_PORT_INFO);
 
-	/*
-	   CLASS PORT INFO does not really look on the SMDB - no lock required.
-	 */
+	/* CLASS PORT INFO does not really look at the SMDB - no lock required. */
 
-	__osm_cpi_rcv_respond(sa, p_madw);
+	cpi_rcv_respond(sa, p_madw);
 
 Exit:
 	OSM_LOG_EXIT(sa->p_log);
diff --git a/opensm/opensm/osm_sa_guidinfo_record.c b/opensm/opensm/osm_sa_guidinfo_record.c
index 39dae72..df98fa1 100644
--- a/opensm/opensm/osm_sa_guidinfo_record.c
+++ b/opensm/opensm/osm_sa_guidinfo_record.c
@@ -73,13 +73,12 @@ typedef struct osm_gir_search_ctxt {
 /**********************************************************************
  **********************************************************************/
 static ib_api_status_t
-__osm_gir_rcv_new_gir(IN osm_sa_t * sa,
-		      IN const osm_node_t * const p_node,
-		      IN cl_qlist_t * const p_list,
-		      IN ib_net64_t const match_port_guid,
-		      IN ib_net16_t const match_lid,
-		      IN const osm_physp_t * const p_req_physp,
-		      IN uint8_t const block_num)
+gir_rcv_new_gir(IN osm_sa_t * sa, IN const osm_node_t * const p_node,
+		IN cl_qlist_t * const p_list,
+		IN ib_net64_t const match_port_guid,
+		IN ib_net16_t const match_lid,
+		IN const osm_physp_t * const p_req_physp,
+		IN uint8_t const block_num)
 {
 	osm_gir_item_t *p_rec_item;
 	ib_api_status_t status = IB_SUCCESS;
@@ -116,13 +115,12 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_gir_create_gir(IN osm_sa_t * sa,
-			IN osm_node_t * const p_node,
-			IN cl_qlist_t * const p_list,
-			IN ib_net64_t const match_port_guid,
-			IN ib_net16_t const match_lid,
-			IN const osm_physp_t * const p_req_physp,
-			IN uint8_t const match_block_num)
+sa_gir_create_gir(IN osm_sa_t * sa, IN osm_node_t * const p_node,
+		  IN cl_qlist_t * const p_list,
+		  IN ib_net64_t const match_port_guid,
+		  IN ib_net16_t const match_lid,
+		  IN const osm_physp_t * const p_req_physp,
+		  IN uint8_t const match_block_num)
 {
 	const osm_physp_t *p_physp;
 	uint8_t port_num;
@@ -206,9 +204,9 @@ __osm_sa_gir_create_gir(IN osm_sa_t * sa,
 
 		for (block_num = start_block_num; block_num <= end_block_num;
 		     block_num++)
-			__osm_gir_rcv_new_gir(sa, p_node, p_list, port_guid,
-					      cl_ntoh16(base_lid_ho), p_physp,
-					      block_num);
+			gir_rcv_new_gir(sa, p_node, p_list, port_guid,
+					cl_ntoh16(base_lid_ho), p_physp,
+					block_num);
 
 	}
 
@@ -218,8 +216,7 @@ __osm_sa_gir_create_gir(IN osm_sa_t * sa,
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_gir_by_comp_mask_cb(IN cl_map_item_t * const p_map_item,
-			     IN void *context)
+sa_gir_by_comp_mask_cb(IN cl_map_item_t * const p_map_item, IN void *context)
 {
 	const osm_gir_search_ctxt_t *const p_ctxt =
 	    (osm_gir_search_ctxt_t *) context;
@@ -285,9 +282,8 @@ __osm_sa_gir_by_comp_mask_cb(IN cl_map_item_t * const p_map_item,
 			goto Exit;
 	}
 
-	__osm_sa_gir_create_gir(sa, p_node, p_ctxt->p_list,
-				match_port_guid, match_lid, p_req_physp,
-				match_block_num);
+	sa_gir_create_gir(sa, p_node, p_ctxt->p_list, match_port_guid,
+			  match_lid, p_req_physp, match_block_num);
 
 Exit:
 	OSM_LOG_EXIT(p_ctxt->sa->p_log);
@@ -350,8 +346,8 @@ void osm_gir_rcv_process(IN void *ctx, IN void *data)
 
 	cl_plock_acquire(sa->p_lock);
 
-	cl_qmap_apply_func(&sa->p_subn->node_guid_tbl,
-			   __osm_sa_gir_by_comp_mask_cb, &context);
+	cl_qmap_apply_func(&sa->p_subn->node_guid_tbl, sa_gir_by_comp_mask_cb,
+			   &context);
 
 	cl_plock_release(sa->p_lock);
 
diff --git a/opensm/opensm/osm_sa_informinfo.c b/opensm/opensm/osm_sa_informinfo.c
index fb81008..c793c3a 100644
--- a/opensm/opensm/osm_sa_informinfo.c
+++ b/opensm/opensm/osm_sa_informinfo.c
@@ -210,8 +210,7 @@ with an InformInfo attribute that is a copy of the data in the
 Set(InformInfo) request.
 **********************************************************************/
 static void
-__osm_infr_rcv_respond(IN osm_sa_t * sa,
-		       IN osm_madw_t * const p_madw)
+infr_rcv_respond(IN osm_sa_t * sa, IN osm_madw_t * const p_madw)
 {
 	cl_qlist_t rec_list;
 	osm_iir_item_t *item;
@@ -244,9 +243,9 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_inform_info_rec_by_comp_mask(IN osm_sa_t * sa,
-				      IN const osm_infr_t * const p_infr,
-				      osm_iir_search_ctxt_t * const p_ctxt)
+sa_inform_info_rec_by_comp_mask(IN osm_sa_t * sa,
+				IN const osm_infr_t * const p_infr,
+				osm_iir_search_ctxt_t * const p_ctxt)
 {
 	const ib_inform_info_record_t *p_rcvd_rec = NULL;
 	ib_net64_t comp_mask;
@@ -313,13 +312,13 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_inform_info_rec_by_comp_mask_cb(IN cl_list_item_t * const p_list_item,
-					 IN void *context)
+sa_inform_info_rec_by_comp_mask_cb(IN cl_list_item_t * const p_list_item,
+				   IN void *context)
 {
 	const osm_infr_t *const p_infr = (osm_infr_t *) p_list_item;
 	osm_iir_search_ctxt_t *const p_ctxt = (osm_iir_search_ctxt_t *) context;
 
-	__osm_sa_inform_info_rec_by_comp_mask(p_ctxt->sa, p_infr, p_ctxt);
+	sa_inform_info_rec_by_comp_mask(p_ctxt->sa, p_infr, p_ctxt);
 }
 
 /**********************************************************************
@@ -379,7 +378,7 @@ osm_infr_rcv_process_get_method(IN osm_sa_t * sa,
 	cl_plock_acquire(sa->p_lock);
 
 	cl_qlist_apply_func(&sa->p_subn->sa_infr_list,
-			    __osm_sa_inform_info_rec_by_comp_mask_cb, &context);
+			    sa_inform_info_rec_by_comp_mask_cb, &context);
 
 	cl_plock_release(sa->p_lock);
 
@@ -555,7 +554,7 @@ osm_infr_rcv_process_set_method(IN osm_sa_t * sa,
 	cl_plock_release(sa->p_lock);
 
 	/* send the success response */
-	__osm_infr_rcv_respond(sa, p_madw);
+	infr_rcv_respond(sa, p_madw);
 
 Exit:
 	OSM_LOG_EXIT(sa->p_log);
diff --git a/opensm/opensm/osm_sa_lft_record.c b/opensm/opensm/osm_sa_lft_record.c
index d84a6a5..ef90028 100644
--- a/opensm/opensm/osm_sa_lft_record.c
+++ b/opensm/opensm/osm_sa_lft_record.c
@@ -70,10 +70,9 @@ typedef struct osm_lftr_search_ctxt {
 /**********************************************************************
  **********************************************************************/
 static ib_api_status_t
-__osm_lftr_rcv_new_lftr(IN osm_sa_t * sa,
-			IN const osm_switch_t * const p_sw,
-			IN cl_qlist_t * const p_list,
-			IN ib_net16_t const lid, IN uint16_t const block)
+lftr_rcv_new_lftr(IN osm_sa_t * sa, IN const osm_switch_t * const p_sw,
+		  IN cl_qlist_t * const p_list,
+		  IN ib_net16_t const lid, IN uint16_t const block)
 {
 	osm_lftr_item_t *p_rec_item;
 	ib_api_status_t status = IB_SUCCESS;
@@ -112,8 +111,7 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_lftr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item,
-			    IN void *context)
+lftr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item, IN void *context)
 {
 	const osm_lftr_search_ctxt_t *const p_ctxt =
 	    (osm_lftr_search_ctxt_t *) context;
@@ -176,8 +174,8 @@ __osm_lftr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item,
 
 	/* so we can add these blocks one by one ... */
 	for (block = min_block; block <= max_block; block++)
-		__osm_lftr_rcv_new_lftr(sa, p_sw, p_ctxt->p_list,
-					osm_port_get_base_lid(p_port), block);
+		lftr_rcv_new_lftr(sa, p_sw, p_ctxt->p_list,
+				  osm_port_get_base_lid(p_port), block);
 }
 
 /**********************************************************************
@@ -234,8 +232,8 @@ void osm_lftr_rcv_process(IN void *ctx, IN void *data)
 	cl_plock_acquire(sa->p_lock);
 
 	/* Go over all switches */
-	cl_qmap_apply_func(&sa->p_subn->sw_guid_tbl,
-			   __osm_lftr_rcv_by_comp_mask, &context);
+	cl_qmap_apply_func(&sa->p_subn->sw_guid_tbl, lftr_rcv_by_comp_mask,
+			   &context);
 
 	cl_plock_release(sa->p_lock);
 
diff --git a/opensm/opensm/osm_sa_link_record.c b/opensm/opensm/osm_sa_link_record.c
index 26d62e0..4df4794 100644
--- a/opensm/opensm/osm_sa_link_record.c
+++ b/opensm/opensm/osm_sa_link_record.c
@@ -63,11 +63,9 @@ typedef struct osm_lr_item {
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_lr_rcv_build_physp_link(IN osm_sa_t * sa,
-			      IN const ib_net16_t from_lid,
-			      IN const ib_net16_t to_lid,
-			      IN const uint8_t from_port,
-			      IN const uint8_t to_port, IN cl_qlist_t * p_list)
+lr_rcv_build_physp_link(IN osm_sa_t * sa, IN const ib_net16_t from_lid,
+			IN const ib_net16_t to_lid, IN const uint8_t from_port,
+			IN const uint8_t to_port, IN cl_qlist_t * p_list)
 {
 	osm_lr_item_t *p_lr_item;
 
@@ -105,13 +103,13 @@ static ib_net16_t get_base_lid(IN const osm_physp_t * p_physp)
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_lr_rcv_get_physp_link(IN osm_sa_t * sa,
-			    IN const ib_link_record_t * const p_lr,
-			    IN const osm_physp_t * p_src_physp,
-			    IN const osm_physp_t * p_dest_physp,
-			    IN const ib_net64_t comp_mask,
-			    IN cl_qlist_t * const p_list,
-			    IN const osm_physp_t * p_req_physp)
+lr_rcv_get_physp_link(IN osm_sa_t * sa,
+		      IN const ib_link_record_t * const p_lr,
+		      IN const osm_physp_t * p_src_physp,
+		      IN const osm_physp_t * p_dest_physp,
+		      IN const ib_net64_t comp_mask,
+		      IN cl_qlist_t * const p_list,
+		      IN const osm_physp_t * p_req_physp)
 {
 	uint8_t src_port_num;
 	uint8_t dest_port_num;
@@ -198,8 +196,8 @@ __osm_lr_rcv_get_physp_link(IN osm_sa_t * sa,
 		dest_port_num);
 
 
-	__osm_lr_rcv_build_physp_link(sa, from_base_lid, to_base_lid,
-				      src_port_num, dest_port_num, p_list);
+	lr_rcv_build_physp_link(sa, from_base_lid, to_base_lid, src_port_num,
+				dest_port_num, p_list);
 
 Exit:
 	OSM_LOG_EXIT(sa->p_log);
@@ -208,13 +206,13 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_lr_rcv_get_port_links(IN osm_sa_t * sa,
-			    IN const ib_link_record_t * const p_lr,
-			    IN const osm_port_t * p_src_port,
-			    IN const osm_port_t * p_dest_port,
-			    IN const ib_net64_t comp_mask,
-			    IN cl_qlist_t * const p_list,
-			    IN const osm_physp_t * p_req_physp)
+lr_rcv_get_port_links(IN osm_sa_t * sa,
+		      IN const ib_link_record_t * const p_lr,
+		      IN const osm_port_t * p_src_port,
+		      IN const osm_port_t * p_dest_port,
+		      IN const ib_net64_t comp_mask,
+		      IN cl_qlist_t * const p_list,
+		      IN const osm_physp_t * p_req_physp)
 {
 	const osm_physp_t *p_src_physp;
 	const osm_physp_t *p_dest_physp;
@@ -251,7 +249,7 @@ __osm_lr_rcv_get_port_links(IN osm_sa_t * sa,
 								   dest_port_num);
 					/* both physical ports should be with data */
 					if (p_src_physp && p_dest_physp)
-						__osm_lr_rcv_get_physp_link
+						lr_rcv_get_physp_link
 						    (sa, p_lr, p_src_physp,
 						     p_dest_physp, comp_mask,
 						     p_list, p_req_physp);
@@ -272,7 +270,7 @@ __osm_lr_rcv_get_port_links(IN osm_sa_t * sa,
 								   p_node,
 								   port_num);
 					if (p_src_physp)
-						__osm_lr_rcv_get_physp_link
+						lr_rcv_get_physp_link
 						    (sa, p_lr, p_src_physp,
 						     NULL, comp_mask, p_list,
 						     p_req_physp);
@@ -287,7 +285,7 @@ __osm_lr_rcv_get_port_links(IN osm_sa_t * sa,
 								   p_node,
 								   port_num);
 					if (p_src_physp)
-						__osm_lr_rcv_get_physp_link
+						lr_rcv_get_physp_link
 						    (sa, p_lr, p_src_physp,
 						     NULL, comp_mask, p_list,
 						     p_req_physp);
@@ -310,7 +308,7 @@ __osm_lr_rcv_get_port_links(IN osm_sa_t * sa,
 								   p_node,
 								   port_num);
 					if (p_dest_physp)
-						__osm_lr_rcv_get_physp_link
+						lr_rcv_get_physp_link
 						    (sa, p_lr, NULL,
 						     p_dest_physp, comp_mask,
 						     p_list, p_req_physp);
@@ -325,7 +323,7 @@ __osm_lr_rcv_get_port_links(IN osm_sa_t * sa,
 								   p_node,
 								   port_num);
 					if (p_dest_physp)
-						__osm_lr_rcv_get_physp_link
+						lr_rcv_get_physp_link
 						    (sa, p_lr, NULL,
 						     p_dest_physp, comp_mask,
 						     p_list, p_req_physp);
@@ -346,7 +344,7 @@ __osm_lr_rcv_get_port_links(IN osm_sa_t * sa,
 					    osm_node_get_physp_ptr(p_node,
 								   port_num);
 					if (p_src_physp)
-						__osm_lr_rcv_get_physp_link
+						lr_rcv_get_physp_link
 						    (sa, p_lr, p_src_physp,
 						     NULL, comp_mask, p_list,
 						     p_req_physp);
@@ -364,10 +362,9 @@ __osm_lr_rcv_get_port_links(IN osm_sa_t * sa,
  Returns the SA status to return to the client.
  **********************************************************************/
 static ib_net16_t
-__osm_lr_rcv_get_end_points(IN osm_sa_t * sa,
-			    IN const osm_madw_t * const p_madw,
-			    OUT const osm_port_t ** const pp_src_port,
-			    OUT const osm_port_t ** const pp_dest_port)
+lr_rcv_get_end_points(IN osm_sa_t * sa, IN const osm_madw_t * const p_madw,
+		      OUT const osm_port_t ** const pp_src_port,
+		      OUT const osm_port_t ** const pp_dest_port)
 {
 	const ib_link_record_t *p_lr;
 	const ib_sa_mad_t *p_sa_mad;
@@ -485,13 +482,11 @@ void osm_lr_rcv_process(IN void *context, IN void *data)
 	 */
 	cl_plock_acquire(sa->p_lock);
 
-	sa_status = __osm_lr_rcv_get_end_points(sa, p_madw,
-						&p_src_port, &p_dest_port);
+	sa_status = lr_rcv_get_end_points(sa, p_madw, &p_src_port, &p_dest_port);
 
 	if (sa_status == IB_SA_MAD_STATUS_SUCCESS)
-		__osm_lr_rcv_get_port_links(sa, p_lr, p_src_port,
-					    p_dest_port, p_sa_mad->comp_mask,
-					    &lr_list, p_req_physp);
+		lr_rcv_get_port_links(sa, p_lr, p_src_port, p_dest_port,
+				      p_sa_mad->comp_mask, &lr_list, p_req_physp);
 
 	cl_plock_release(sa->p_lock);
 
diff --git a/opensm/opensm/osm_sa_mad_ctrl.c b/opensm/opensm/osm_sa_mad_ctrl.c
index 49309f9..3ed763d 100644
--- a/opensm/opensm/osm_sa_mad_ctrl.c
+++ b/opensm/opensm/osm_sa_mad_ctrl.c
@@ -52,9 +52,9 @@
 #include <opensm/osm_helper.h>
 #include <opensm/osm_sa.h>
 
-/****f* opensm: SA/__osm_sa_mad_ctrl_disp_done_callback
+/****f* opensm: SA/sa_mad_ctrl_disp_done_callback
  * NAME
- * __osm_sa_mad_ctrl_disp_done_callback
+ * sa_mad_ctrl_disp_done_callback
  *
  * DESCRIPTION
  * This function is the Dispatcher callback that indicates
@@ -63,7 +63,7 @@
  * SYNOPSIS
  */
 static void
-__osm_sa_mad_ctrl_disp_done_callback(IN void *context, IN void *p_data)
+sa_mad_ctrl_disp_done_callback(IN void *context, IN void *p_data)
 {
 	osm_sa_mad_ctrl_t *const p_ctrl = (osm_sa_mad_ctrl_t *) context;
 	osm_madw_t *const p_madw = (osm_madw_t *) p_data;
@@ -80,9 +80,9 @@ __osm_sa_mad_ctrl_disp_done_callback(IN void *context, IN void *p_data)
 
 /************/
 
-/****f* opensm: SA/__osm_sa_mad_ctrl_process
+/****f* opensm: SA/sa_mad_ctrl_process
  * NAME
- * __osm_sa_mad_ctrl_process
+ * sa_mad_ctrl_process
  *
  * DESCRIPTION
  * This function handles known methods for received MADs.
@@ -90,8 +90,7 @@ __osm_sa_mad_ctrl_disp_done_callback(IN void *context, IN void *p_data)
  * SYNOPSIS
  */
 static void
-__osm_sa_mad_ctrl_process(IN osm_sa_mad_ctrl_t * const p_ctrl,
-			  IN osm_madw_t * p_madw)
+sa_mad_ctrl_process(IN osm_sa_mad_ctrl_t * const p_ctrl, IN osm_madw_t * p_madw)
 {
 	ib_sa_mad_t *p_sa_mad;
 	cl_status_t status;
@@ -232,11 +231,8 @@ __osm_sa_mad_ctrl_process(IN osm_sa_mad_ctrl_t * const p_ctrl,
 			"Posting Dispatcher message %s\n",
 			osm_get_disp_msg_str(msg_id));
 
-		status = cl_disp_post(p_ctrl->h_disp,
-				      msg_id,
-				      p_madw,
-				      __osm_sa_mad_ctrl_disp_done_callback,
-				      p_ctrl);
+		status = cl_disp_post(p_ctrl->h_disp, msg_id, p_madw,
+				      sa_mad_ctrl_disp_done_callback, p_ctrl);
 
 		if (status != CL_SUCCESS) {
 			OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 1A02: "
@@ -270,9 +266,9 @@ Exit:
  * SEE ALSO
  *********/
 
-/****f* opensm: SA/__osm_sa_mad_ctrl_rcv_callback
+/****f* opensm: SA/sa_mad_ctrl_rcv_callback
  * NAME
- * __osm_sa_mad_ctrl_rcv_callback
+ * sa_mad_ctrl_rcv_callback
  *
  * DESCRIPTION
  * This is the callback from the transport layer for received MADs.
@@ -280,9 +276,8 @@ Exit:
  * SYNOPSIS
  */
 static void
-__osm_sa_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw,
-			       IN void *bind_context,
-			       IN osm_madw_t * p_req_madw)
+sa_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw, IN void *bind_context,
+			 IN osm_madw_t * p_req_madw)
 {
 	osm_sa_mad_ctrl_t *p_ctrl = (osm_sa_mad_ctrl_t *) bind_context;
 	ib_sa_mad_t *p_sa_mad;
@@ -363,7 +358,7 @@ __osm_sa_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw,
 #endif
 	case IB_MAD_METHOD_SET:
 	case IB_MAD_METHOD_DELETE:
-		__osm_sa_mad_ctrl_process(p_ctrl, p_madw);
+		sa_mad_ctrl_process(p_ctrl, p_madw);
 		break;
 
 	default:
@@ -388,9 +383,9 @@ Exit:
  * SEE ALSO
  *********/
 
-/****f* opensm: SA/__osm_sa_mad_ctrl_send_err_callback
+/****f* opensm: SA/sa_mad_ctrl_send_err_callback
  * NAME
- * __osm_sa_mad_ctrl_send_err_callback
+ * sa_mad_ctrl_send_err_callback
  *
  * DESCRIPTION
  * This is the callback from the transport layer for send errors
@@ -399,8 +394,7 @@ Exit:
  * SYNOPSIS
  */
 static void
-__osm_sa_mad_ctrl_send_err_callback(IN void *bind_context,
-				    IN osm_madw_t * p_madw)
+sa_mad_ctrl_send_err_callback(IN void *bind_context, IN osm_madw_t * p_madw)
 {
 	osm_sa_mad_ctrl_t *p_ctrl = (osm_sa_mad_ctrl_t *) bind_context;
 	cl_status_t status;
@@ -425,7 +419,7 @@ __osm_sa_mad_ctrl_send_err_callback(IN void *bind_context,
 	osm_dump_sa_mad(p_ctrl->p_log, osm_madw_get_sa_mad_ptr(p_madw),
 			OSM_LOG_ERROR);
 
-	/*  __osm_sm_mad_ctrl_update_wire_stats( p_ctrl ); */
+	/*  sm_mad_ctrl_update_wire_stats( p_ctrl ); */
 
 	if (osm_madw_get_err_msg(p_madw) != CL_DISP_MSGID_NONE) {
 		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
@@ -433,10 +427,8 @@ __osm_sa_mad_ctrl_send_err_callback(IN void *bind_context,
 			osm_get_disp_msg_str(osm_madw_get_err_msg(p_madw)));
 
 		status = cl_disp_post(p_ctrl->h_disp,
-				      osm_madw_get_err_msg(p_madw),
-				      p_madw,
-				      __osm_sa_mad_ctrl_disp_done_callback,
-				      p_ctrl);
+				      osm_madw_get_err_msg(p_madw), p_madw,
+				      sa_mad_ctrl_disp_done_callback, p_ctrl);
 		if (status != CL_SUCCESS) {
 			OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 1A07: "
 				"Dispatcher post message failed (%s)\n",
@@ -550,11 +542,10 @@ osm_sa_mad_ctrl_bind(IN osm_sa_mad_ctrl_t * const p_ctrl,
 	OSM_LOG(p_ctrl->p_log, OSM_LOG_VERBOSE,
 		"Binding to port GUID 0x%" PRIx64 "\n", cl_ntoh64(port_guid));
 
-	p_ctrl->h_bind = osm_vendor_bind(p_ctrl->p_vendor,
-					 &bind_info,
+	p_ctrl->h_bind = osm_vendor_bind(p_ctrl->p_vendor, &bind_info,
 					 p_ctrl->p_mad_pool,
-					 __osm_sa_mad_ctrl_rcv_callback,
-					 __osm_sa_mad_ctrl_send_err_callback,
+					 sa_mad_ctrl_rcv_callback,
+					 sa_mad_ctrl_send_err_callback,
 					 p_ctrl);
 
 	if (p_ctrl->h_bind == OSM_BIND_INVALID_HANDLE) {
diff --git a/opensm/opensm/osm_sa_mcmember_record.c b/opensm/opensm/osm_sa_mcmember_record.c
index b586942..f87df31 100644
--- a/opensm/opensm/osm_sa_mcmember_record.c
+++ b/opensm/opensm/osm_sa_mcmember_record.c
@@ -228,9 +228,8 @@ __check_create_comp_mask(ib_net64_t comp_mask,
  Generate the response MAD
 **********************************************************************/
 static void
-__osm_mcmr_rcv_respond(IN osm_sa_t * sa,
-		       IN osm_madw_t * const p_madw,
-		       IN ib_member_rec_t * p_mcmember_rec)
+mcmr_rcv_respond(IN osm_sa_t * sa, IN osm_madw_t * const p_madw,
+		 IN ib_member_rec_t * p_mcmember_rec)
 {
 	cl_qlist_t rec_list;
 	osm_mcmr_item_t *item;
@@ -1024,8 +1023,7 @@ osm_mcmr_rcv_find_or_create_new_mgrp(IN osm_sa_t * sa,
 Process a request for leaving the group
 **********************************************************************/
 static void
-__osm_mcmr_rcv_leave_mgrp(IN osm_sa_t * sa,
-			  IN osm_madw_t * const p_madw)
+mcmr_rcv_leave_mgrp(IN osm_sa_t * sa, IN osm_madw_t * const p_madw)
 {
 	osm_mgrp_t *p_mgrp;
 	ib_sa_mad_t *p_sa_mad;
@@ -1098,8 +1096,7 @@ __osm_mcmr_rcv_leave_mgrp(IN osm_sa_t * sa,
 		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B09: "
 			"osm_sm_mcgrp_leave failed\n");
 
-	/* Send an SA response */
-	__osm_mcmr_rcv_respond(sa, p_madw, &mcmember_rec);
+	mcmr_rcv_respond(sa, p_madw, &mcmember_rec);
 
 Exit:
 	OSM_LOG_EXIT(sa->p_log);
@@ -1109,7 +1106,7 @@ Exit:
  Handle a join (or create) request
 **********************************************************************/
 static void
-__osm_mcmr_rcv_join_mgrp(IN osm_sa_t * sa, IN osm_madw_t * const p_madw)
+mcmr_rcv_join_mgrp(IN osm_sa_t * sa, IN osm_madw_t * const p_madw)
 {
 	osm_mgrp_t *p_mgrp = NULL;
 	ib_api_status_t status;
@@ -1351,7 +1348,7 @@ __osm_mcmr_rcv_join_mgrp(IN osm_sa_t * sa, IN osm_madw_t * const p_madw)
 	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
 		osm_dump_mc_record(sa->p_log, &mcmember_rec, OSM_LOG_DEBUG);
 
-	__osm_mcmr_rcv_respond(sa, p_madw, &mcmember_rec);
+	mcmr_rcv_respond(sa, p_madw, &mcmember_rec);
 
 Exit:
 	OSM_LOG_EXIT(sa->p_log);
@@ -1361,9 +1358,8 @@ Exit:
  Add a patched multicast group to the results list
 **********************************************************************/
 static ib_api_status_t
-__osm_mcmr_rcv_new_mcmr(IN osm_sa_t * sa,
-			IN const ib_member_rec_t * p_rcvd_rec,
-			IN cl_qlist_t * const p_list)
+mcmr_rcv_new_mcmr(IN osm_sa_t * sa, IN const ib_member_rec_t * p_rcvd_rec,
+		  IN cl_qlist_t * const p_list)
 {
 	osm_mcmr_item_t *p_rec_item;
 	ib_api_status_t status = IB_SUCCESS;
@@ -1538,7 +1534,7 @@ static void mcmr_by_comp_mask(osm_sa_t *sa, const ib_member_rec_t *p_rcvd_rec,
 				match_rec.proxy_join =
 				    (uint8_t) (p_mcm_port->proxy_join);
 
-				__osm_mcmr_rcv_new_mcmr(sa, &match_rec, list);
+				mcmr_rcv_new_mcmr(sa, &match_rec, list);
 			}
 			p_item = cl_qmap_next(p_item);
 		}
@@ -1555,7 +1551,7 @@ static void mcmr_by_comp_mask(osm_sa_t *sa, const ib_member_rec_t *p_rcvd_rec,
 		memcpy(&(match_rec.port_gid), &port_gid, sizeof(ib_gid_t));
 		match_rec.proxy_join = (uint8_t) proxy_join;
 
-		__osm_mcmr_rcv_new_mcmr(sa, &match_rec, list);
+		mcmr_rcv_new_mcmr(sa, &match_rec, list);
 	}
 
 Exit:
@@ -1566,8 +1562,7 @@ Exit:
  Handle a query request
 **********************************************************************/
 static void
-__osm_mcmr_query_mgrp(IN osm_sa_t * sa,
-		      IN osm_madw_t * const p_madw)
+mcmr_query_mgrp(IN osm_sa_t * sa, IN osm_madw_t * const p_madw)
 {
 	const ib_sa_mad_t *p_rcvd_mad;
 	const ib_member_rec_t *p_rcvd_rec;
@@ -1687,7 +1682,7 @@ void osm_mcmr_rcv_process(IN void *context, IN void *data)
 		/*
 		 * Join or Create Multicast Group
 		 */
-		__osm_mcmr_rcv_join_mgrp(sa, p_madw);
+		mcmr_rcv_join_mgrp(sa, p_madw);
 		break;
 	case IB_MAD_METHOD_DELETE:
 		if (!__check_join_comp_mask(p_sa_mad->comp_mask)) {
@@ -1705,14 +1700,14 @@ void osm_mcmr_rcv_process(IN void *context, IN void *data)
 		/*
 		 * Leave Multicast Group
 		 */
-		__osm_mcmr_rcv_leave_mgrp(sa, p_madw);
+		mcmr_rcv_leave_mgrp(sa, p_madw);
 		break;
 	case IB_MAD_METHOD_GET:
 	case IB_MAD_METHOD_GETTABLE:
 		/*
 		 * Querying a Multicast Group
 		 */
-		__osm_mcmr_query_mgrp(sa, p_madw);
+		mcmr_query_mgrp(sa, p_madw);
 		break;
 	default:
 		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B21: "
diff --git a/opensm/opensm/osm_sa_mft_record.c b/opensm/opensm/osm_sa_mft_record.c
index bda9aee..0337853 100644
--- a/opensm/opensm/osm_sa_mft_record.c
+++ b/opensm/opensm/osm_sa_mft_record.c
@@ -70,11 +70,9 @@ typedef struct osm_mftr_search_ctxt {
 /**********************************************************************
  **********************************************************************/
 static ib_api_status_t
-__osm_mftr_rcv_new_mftr(IN osm_sa_t * sa,
-			IN osm_switch_t * const p_sw,
-			IN cl_qlist_t * const p_list,
-			IN ib_net16_t const lid,
-			IN uint16_t const block, IN uint8_t const position)
+mftr_rcv_new_mftr(IN osm_sa_t * sa, IN osm_switch_t * const p_sw,
+		  IN cl_qlist_t * const p_list, IN ib_net16_t const lid,
+		  IN uint16_t const block, IN uint8_t const position)
 {
 	osm_mftr_item_t *p_rec_item;
 	ib_api_status_t status = IB_SUCCESS;
@@ -117,8 +115,7 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_mftr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item,
-			    IN void *context)
+mftr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item, IN void *context)
 {
 	const osm_mftr_search_ctxt_t *const p_ctxt =
 	    (osm_mftr_search_ctxt_t *) context;
@@ -208,9 +205,9 @@ __osm_mftr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item,
 	for (block = min_block; block <= max_block; block++)
 		for (position = min_position; position <= max_position;
 		     position++)
-			__osm_mftr_rcv_new_mftr(sa, p_sw, p_ctxt->p_list,
-						osm_port_get_base_lid(p_port),
-						block, position);
+			mftr_rcv_new_mftr(sa, p_sw, p_ctxt->p_list,
+					  osm_port_get_base_lid(p_port),
+					  block, position);
 }
 
 /**********************************************************************
@@ -268,8 +265,8 @@ void osm_mftr_rcv_process(IN void *ctx, IN void *data)
 	cl_plock_acquire(sa->p_lock);
 
 	/* Go over all switches */
-	cl_qmap_apply_func(&sa->p_subn->sw_guid_tbl,
-			   __osm_mftr_rcv_by_comp_mask, &context);
+	cl_qmap_apply_func(&sa->p_subn->sw_guid_tbl, mftr_rcv_by_comp_mask,
+			   &context);
 
 	cl_plock_release(sa->p_lock);
 
diff --git a/opensm/opensm/osm_sa_multipath_record.c b/opensm/opensm/osm_sa_multipath_record.c
index b9164be..0fa7193 100644
--- a/opensm/opensm/osm_sa_multipath_record.c
+++ b/opensm/opensm/osm_sa_multipath_record.c
@@ -84,7 +84,7 @@ typedef struct osm_path_parms {
 /**********************************************************************
  **********************************************************************/
 static inline boolean_t
-__osm_sa_multipath_rec_is_tavor_port(IN const osm_port_t * const p_port)
+sa_multipath_rec_is_tavor_port(IN const osm_port_t * const p_port)
 {
 	osm_node_t const *p_node;
 	ib_net32_t vend_id;
@@ -102,19 +102,16 @@ __osm_sa_multipath_rec_is_tavor_port(IN const osm_port_t * const p_port)
 /**********************************************************************
  **********************************************************************/
 static boolean_t
-__osm_sa_multipath_rec_apply_tavor_mtu_limit(IN const ib_multipath_rec_t *
-					     const p_mpr,
-					     IN const osm_port_t *
-					     const p_src_port,
-					     IN const osm_port_t *
-					     const p_dest_port,
-					     IN const ib_net64_t comp_mask)
+sa_multipath_rec_apply_tavor_mtu_limit(IN const ib_multipath_rec_t * const p_mpr,
+				       IN const osm_port_t * const p_src_port,
+				       IN const osm_port_t * const p_dest_port,
+				       IN const ib_net64_t comp_mask)
 {
 	uint8_t required_mtu;
 
 	/* only if at least one of the ports is a Tavor device */
-	if (!__osm_sa_multipath_rec_is_tavor_port(p_src_port) &&
-	    !__osm_sa_multipath_rec_is_tavor_port(p_dest_port))
+	if (!sa_multipath_rec_is_tavor_port(p_src_port) &&
+	    !sa_multipath_rec_is_tavor_port(p_dest_port))
 		return (FALSE);
 
 	/*
@@ -157,13 +154,13 @@ __osm_sa_multipath_rec_apply_tavor_mtu_limit(IN const ib_multipath_rec_t *
 /**********************************************************************
  **********************************************************************/
 static ib_api_status_t
-__osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
-			     IN const ib_multipath_rec_t * const p_mpr,
-			     IN const osm_port_t * const p_src_port,
-			     IN const osm_port_t * const p_dest_port,
-			     IN const uint16_t dest_lid_ho,
-			     IN const ib_net64_t comp_mask,
-			     OUT osm_path_parms_t * const p_parms)
+mpr_rcv_get_path_parms(IN osm_sa_t * sa,
+		       IN const ib_multipath_rec_t * const p_mpr,
+		       IN const osm_port_t * const p_src_port,
+		       IN const osm_port_t * const p_dest_port,
+		       IN const uint16_t dest_lid_ho,
+		       IN const ib_net64_t comp_mask,
+		       OUT osm_path_parms_t * const p_parms)
 {
 	const osm_node_t *p_node;
 	const osm_physp_t *p_physp;
@@ -207,9 +204,8 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 	   port MTU with 1K.
 	 */
 	if (sa->p_subn->opt.enable_quirks &&
-	    __osm_sa_multipath_rec_apply_tavor_mtu_limit(p_mpr, p_src_port,
-							 p_dest_port,
-							 comp_mask))
+	    sa_multipath_rec_apply_tavor_mtu_limit(p_mpr, p_src_port,
+						   p_dest_port, comp_mask))
 		if (mtu > IB_MTU_LEN_1024) {
 			mtu = IB_MTU_LEN_1024;
 			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
@@ -744,14 +740,12 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_mpr_rcv_build_pr(IN osm_sa_t * sa,
-		       IN const osm_port_t * const p_src_port,
-		       IN const osm_port_t * const p_dest_port,
-		       IN const uint16_t src_lid_ho,
-		       IN const uint16_t dest_lid_ho,
-		       IN const uint8_t preference,
-		       IN const osm_path_parms_t * const p_parms,
-		       OUT ib_path_rec_t * const p_pr)
+mpr_rcv_build_pr(IN osm_sa_t * sa, IN const osm_port_t * const p_src_port,
+		 IN const osm_port_t * const p_dest_port,
+		 IN const uint16_t src_lid_ho, IN const uint16_t dest_lid_ho,
+		 IN const uint8_t preference,
+		 IN const osm_path_parms_t * const p_parms,
+		 OUT ib_path_rec_t * const p_pr)
 {
 	const osm_physp_t *p_src_physp;
 	const osm_physp_t *p_dest_physp;
@@ -797,14 +791,14 @@ __osm_mpr_rcv_build_pr(IN osm_sa_t * sa,
 /**********************************************************************
  **********************************************************************/
 static osm_mpr_item_t *
-__osm_mpr_rcv_get_lid_pair_path(IN osm_sa_t * sa,
-				IN const ib_multipath_rec_t * const p_mpr,
-				IN const osm_port_t * const p_src_port,
-				IN const osm_port_t * const p_dest_port,
-				IN const uint16_t src_lid_ho,
-				IN const uint16_t dest_lid_ho,
-				IN const ib_net64_t comp_mask,
-				IN const uint8_t preference)
+mpr_rcv_get_lid_pair_path(IN osm_sa_t * sa,
+			  IN const ib_multipath_rec_t * const p_mpr,
+			  IN const osm_port_t * const p_src_port,
+			  IN const osm_port_t * const p_dest_port,
+			  IN const uint16_t src_lid_ho,
+			  IN const uint16_t dest_lid_ho,
+			  IN const ib_net64_t comp_mask,
+			  IN const uint8_t preference)
 {
 	osm_path_parms_t path_parms;
 	osm_path_parms_t rev_path_parms;
@@ -824,9 +818,8 @@ __osm_mpr_rcv_get_lid_pair_path(IN osm_sa_t * sa,
 	}
 	memset(p_pr_item, 0, sizeof(*p_pr_item));
 
-	status = __osm_mpr_rcv_get_path_parms(sa, p_mpr, p_src_port,
-					      p_dest_port, dest_lid_ho,
-					      comp_mask, &path_parms);
+	status = mpr_rcv_get_path_parms(sa, p_mpr, p_src_port, p_dest_port,
+					dest_lid_ho, comp_mask, &path_parms);
 
 	if (status != IB_SUCCESS) {
 		free(p_pr_item);
@@ -835,10 +828,9 @@ __osm_mpr_rcv_get_lid_pair_path(IN osm_sa_t * sa,
 	}
 
 	/* now try the reversible path */
-	rev_path_status =
-	    __osm_mpr_rcv_get_path_parms(sa, p_mpr, p_dest_port, p_src_port,
-					 src_lid_ho, comp_mask,
-					 &rev_path_parms);
+	rev_path_status = mpr_rcv_get_path_parms(sa, p_mpr, p_dest_port,
+						 p_src_port, src_lid_ho,
+						 comp_mask, &rev_path_parms);
 	path_parms.reversible = (rev_path_status == IB_SUCCESS);
 
 	/* did we get a Reversible Path compmask ? */
@@ -862,9 +854,8 @@ __osm_mpr_rcv_get_lid_pair_path(IN osm_sa_t * sa,
 	p_pr_item->p_dest_port = p_dest_port;
 	p_pr_item->hops = path_parms.hops;
 
-	__osm_mpr_rcv_build_pr(sa, p_src_port, p_dest_port, src_lid_ho,
-			       dest_lid_ho, preference, &path_parms,
-			       &p_pr_item->path_rec);
+	mpr_rcv_build_pr(sa, p_src_port, p_dest_port, src_lid_ho, dest_lid_ho,
+			 preference, &path_parms, &p_pr_item->path_rec);
 
 Exit:
 	OSM_LOG_EXIT(sa->p_log);
@@ -874,14 +865,14 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static uint32_t
-__osm_mpr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
-				  IN const ib_multipath_rec_t * const p_mpr,
-				  IN const osm_port_t * const p_req_port,
-				  IN const osm_port_t * const p_src_port,
-				  IN const osm_port_t * const p_dest_port,
-				  IN const uint32_t rem_paths,
-				  IN const ib_net64_t comp_mask,
-				  IN cl_qlist_t * const p_list)
+mpr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
+			    IN const ib_multipath_rec_t * const p_mpr,
+			    IN const osm_port_t * const p_req_port,
+			    IN const osm_port_t * const p_src_port,
+			    IN const osm_port_t * const p_dest_port,
+			    IN const uint32_t rem_paths,
+			    IN const ib_net64_t comp_mask,
+			    IN cl_qlist_t * const p_list)
 {
 	osm_mpr_item_t *p_pr_item;
 	uint16_t src_lid_min_ho;
@@ -977,13 +968,10 @@ __osm_mpr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
 		/*
 		   These paths are "fully redundant"
 		 */
-		p_pr_item = __osm_mpr_rcv_get_lid_pair_path(sa, p_mpr,
-							    p_src_port,
-							    p_dest_port,
-							    src_lid_ho,
-							    dest_lid_ho,
-							    comp_mask,
-							    preference);
+		p_pr_item = mpr_rcv_get_lid_pair_path(sa, p_mpr, p_src_port,
+						      p_dest_port, src_lid_ho,
+						      dest_lid_ho, comp_mask,
+						      preference);
 
 		if (p_pr_item) {
 			cl_qlist_insert_tail(p_list, &p_pr_item->list_item);
@@ -1043,13 +1031,10 @@ __osm_mpr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
 		if (src_offset == dest_offset)
 			continue;	/* already reported */
 
-		p_pr_item = __osm_mpr_rcv_get_lid_pair_path(sa, p_mpr,
-							    p_src_port,
-							    p_dest_port,
-							    src_lid_ho,
-							    dest_lid_ho,
-							    comp_mask,
-							    preference);
+		p_pr_item = mpr_rcv_get_lid_pair_path(sa, p_mpr, p_src_port,
+						      p_dest_port, src_lid_ho,
+						      dest_lid_ho, comp_mask,
+						      preference);
 
 		if (p_pr_item) {
 			cl_qlist_insert_tail(p_list, &p_pr_item->list_item);
@@ -1068,13 +1053,13 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static osm_mpr_item_t *
-__osm_mpr_rcv_get_apm_port_pair_paths(IN osm_sa_t * sa,
-				      IN const ib_multipath_rec_t * const p_mpr,
-				      IN const osm_port_t * const p_src_port,
-				      IN const osm_port_t * const p_dest_port,
-				      IN int base_offs,
-				      IN const ib_net64_t comp_mask,
-				      IN cl_qlist_t * const p_list)
+mpr_rcv_get_apm_port_pair_paths(IN osm_sa_t * sa,
+				IN const ib_multipath_rec_t * const p_mpr,
+				IN const osm_port_t * const p_src_port,
+				IN const osm_port_t * const p_dest_port,
+				IN int base_offs,
+				IN const ib_net64_t comp_mask,
+				IN cl_qlist_t * const p_list)
 {
 	osm_mpr_item_t *p_pr_item = 0;
 	uint16_t src_lid_min_ho;
@@ -1118,12 +1103,9 @@ __osm_mpr_rcv_get_apm_port_pair_paths(IN osm_sa_t * sa,
 		/*
 		   These paths are "fully redundant"
 		 */
-		p_pr_item = __osm_mpr_rcv_get_lid_pair_path(sa, p_mpr,
-							    p_src_port,
-							    p_dest_port,
-							    src_lid_ho,
-							    dest_lid_ho,
-							    comp_mask, 0);
+		p_pr_item = mpr_rcv_get_lid_pair_path(sa, p_mpr, p_src_port,
+						      p_dest_port, src_lid_ho,
+						      dest_lid_ho, comp_mask, 0);
 
 		if (p_pr_item) {
 			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
@@ -1146,9 +1128,8 @@ __osm_mpr_rcv_get_apm_port_pair_paths(IN osm_sa_t * sa,
 /**********************************************************************
  **********************************************************************/
 static ib_net16_t
-__osm_mpr_rcv_get_gids(IN osm_sa_t * sa,
-		       IN const ib_gid_t * gids,
-		       IN int ngids, IN int is_sgid, OUT osm_port_t ** pp_port)
+mpr_rcv_get_gids(IN osm_sa_t * sa, IN const ib_gid_t * gids, IN int ngids,
+		 IN int is_sgid, OUT osm_port_t ** pp_port)
 {
 	osm_port_t *p_port;
 	ib_net16_t ib_status = IB_SUCCESS;
@@ -1206,10 +1187,9 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static ib_net16_t
-__osm_mpr_rcv_get_end_points(IN osm_sa_t * sa,
-			     IN const osm_madw_t * const p_madw,
-			     OUT osm_port_t ** pp_ports,
-			     OUT int *nsrc, OUT int *ndest)
+mpr_rcv_get_end_points(IN osm_sa_t * sa, IN const osm_madw_t * const p_madw,
+		       OUT osm_port_t ** pp_ports, OUT int *nsrc,
+		       OUT int *ndest)
 {
 	const ib_multipath_rec_t *p_mpr;
 	const ib_sa_mad_t *p_sa_mad;
@@ -1239,8 +1219,7 @@ __osm_mpr_rcv_get_end_points(IN osm_sa_t * sa,
 		*nsrc = p_mpr->sgid_count;
 		if (*nsrc > IB_MULTIPATH_MAX_GIDS)
 			*nsrc = IB_MULTIPATH_MAX_GIDS;
-		sa_status =
-		    __osm_mpr_rcv_get_gids(sa, gids, *nsrc, 1, pp_ports);
+		sa_status = mpr_rcv_get_gids(sa, gids, *nsrc, 1, pp_ports);
 		if (sa_status != IB_SUCCESS)
 			goto Exit;
 	}
@@ -1250,8 +1229,8 @@ __osm_mpr_rcv_get_end_points(IN osm_sa_t * sa,
 		if (*ndest + *nsrc > IB_MULTIPATH_MAX_GIDS)
 			*ndest = IB_MULTIPATH_MAX_GIDS - *nsrc;
 		sa_status =
-		    __osm_mpr_rcv_get_gids(sa, gids + *nsrc, *ndest, 0,
-					   pp_ports + *nsrc);
+		    mpr_rcv_get_gids(sa, gids + *nsrc, *ndest, 0,
+				     pp_ports + *nsrc);
 	}
 
 Exit:
@@ -1259,18 +1238,18 @@ Exit:
 	return (sa_status);
 }
 
-#define __hash_lids(a, b, lmc)	\
+#define hash_lids(a, b, lmc)	\
 	(((((a) >> (lmc)) << 4) | ((b) >> (lmc))) % 103)
 
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_mpr_rcv_get_apm_paths(IN osm_sa_t * sa,
-			    IN const ib_multipath_rec_t * const p_mpr,
-			    IN const osm_port_t * const p_req_port,
-			    IN osm_port_t ** _pp_ports,
-			    IN const ib_net64_t comp_mask,
-			    IN cl_qlist_t * const p_list)
+mpr_rcv_get_apm_paths(IN osm_sa_t * sa,
+		      IN const ib_multipath_rec_t * const p_mpr,
+		      IN const osm_port_t * const p_req_port,
+		      IN osm_port_t ** _pp_ports,
+		      IN const ib_net64_t comp_mask,
+		      IN cl_qlist_t * const p_list)
 {
 	osm_port_t *pp_ports[4];
 	osm_mpr_item_t *matrix[2][2];
@@ -1287,9 +1266,9 @@ __osm_mpr_rcv_get_apm_paths(IN osm_sa_t * sa,
 	 *    2. keep consistent paths no matter of direction and order of ports
 	 *    3. distibute the lid offsets to balance the load
 	 * So, we sort the ports (within the srcs, and within the dests),
-	 * hash the lids of S0, D0 (after the sort), and call __osm_mpr_rcv_get_apm_port_pair_paths
+	 * hash the lids of S0, D0 (after the sort), and call mpr_rcv_get_apm_port_pair_paths
 	 * with base_lid for S0, D0 and base_lid + 1 for S1, D1. This way we will get
-	 * always the same offsets - order indepentent, and make sure different spines are used.
+	 * always the same offsets - order independent, and make sure different spines are used.
 	 * Note that the diagonals on a Clos have the same number of hops, so it doesn't
 	 * really matter which diagonal we use.
 	 */
@@ -1312,25 +1291,21 @@ __osm_mpr_rcv_get_apm_paths(IN osm_sa_t * sa,
 	dest_lid_ho = osm_port_get_base_lid(pp_ports[2]);
 
 	base_offs = src_lid_ho < dest_lid_ho ?
-	    __hash_lids(src_lid_ho, dest_lid_ho, sa->p_subn->opt.lmc) :
-	    __hash_lids(dest_lid_ho, src_lid_ho, sa->p_subn->opt.lmc);
+	    hash_lids(src_lid_ho, dest_lid_ho, sa->p_subn->opt.lmc) :
+	    hash_lids(dest_lid_ho, src_lid_ho, sa->p_subn->opt.lmc);
 
 	matrix[0][0] =
-	    __osm_mpr_rcv_get_apm_port_pair_paths(sa, p_mpr, pp_ports[0],
-						  pp_ports[2], base_offs,
-						  comp_mask, p_list);
+	    mpr_rcv_get_apm_port_pair_paths(sa, p_mpr, pp_ports[0], pp_ports[2],
+					    base_offs, comp_mask, p_list);
 	matrix[0][1] =
-	    __osm_mpr_rcv_get_apm_port_pair_paths(sa, p_mpr, pp_ports[0],
-						  pp_ports[3], base_offs,
-						  comp_mask, p_list);
+	    mpr_rcv_get_apm_port_pair_paths(sa, p_mpr, pp_ports[0], pp_ports[3],
+					    base_offs, comp_mask, p_list);
 	matrix[1][0] =
-	    __osm_mpr_rcv_get_apm_port_pair_paths(sa, p_mpr, pp_ports[1],
-						  pp_ports[2], base_offs + 1,
-						  comp_mask, p_list);
+	    mpr_rcv_get_apm_port_pair_paths(sa, p_mpr, pp_ports[1], pp_ports[2],
+					    base_offs + 1, comp_mask, p_list);
 	matrix[1][1] =
-	    __osm_mpr_rcv_get_apm_port_pair_paths(sa, p_mpr, pp_ports[1],
-						  pp_ports[3], base_offs + 1,
-						  comp_mask, p_list);
+	    mpr_rcv_get_apm_port_pair_paths(sa, p_mpr, pp_ports[1], pp_ports[3],
+					    base_offs + 1, comp_mask, p_list);
 
 	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "APM matrix:\n"
 		"\t{0,0} 0x%X->0x%X (%d)\t| {0,1} 0x%X->0x%X (%d)\n"
@@ -1385,14 +1360,13 @@ __osm_mpr_rcv_get_apm_paths(IN osm_sa_t * sa,
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_mpr_rcv_process_pairs(IN osm_sa_t * sa,
-			    IN const ib_multipath_rec_t * const p_mpr,
-			    IN osm_port_t * const p_req_port,
-			    IN osm_port_t ** pp_ports,
-			    IN const int nsrc,
-			    IN const int ndest,
-			    IN const ib_net64_t comp_mask,
-			    IN cl_qlist_t * const p_list)
+mpr_rcv_process_pairs(IN osm_sa_t * sa,
+		      IN const ib_multipath_rec_t * const p_mpr,
+		      IN osm_port_t * const p_req_port,
+		      IN osm_port_t ** pp_ports,
+		      IN const int nsrc, IN const int ndest,
+		      IN const ib_net64_t comp_mask,
+		      IN cl_qlist_t * const p_list)
 {
 	osm_port_t **pp_src_port, **pp_es;
 	osm_port_t **pp_dest_port, **pp_ed;
@@ -1410,14 +1384,11 @@ __osm_mpr_rcv_process_pairs(IN osm_sa_t * sa,
 		for (pp_dest_port = pp_es, pp_ed = pp_es + ndest;
 		     pp_dest_port < pp_ed; pp_dest_port++) {
 			num_paths =
-			    __osm_mpr_rcv_get_port_pair_paths(sa, p_mpr,
-							      p_req_port,
-							      *pp_src_port,
-							      *pp_dest_port,
-							      max_paths -
-							      total_paths,
-							      comp_mask,
-							      p_list);
+			    mpr_rcv_get_port_pair_paths(sa, p_mpr, p_req_port,
+							*pp_src_port,
+							*pp_dest_port,
+							max_paths - total_paths,
+							comp_mask, p_list);
 			total_paths += num_paths;
 			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"%d paths %d total paths %d max paths\n",
@@ -1492,13 +1463,12 @@ void osm_mpr_rcv_process(IN void *context, IN void *data)
 	 */
 	cl_plock_acquire(sa->p_lock);
 
-	sa_status = __osm_mpr_rcv_get_end_points(sa, p_madw, pp_ports,
-						 &nsrc, &ndest);
+	sa_status = mpr_rcv_get_end_points(sa, p_madw, pp_ports, &nsrc, &ndest);
 
 	if (sa_status != IB_SA_MAD_STATUS_SUCCESS || !nsrc || !ndest) {
 		if (sa_status == IB_SA_MAD_STATUS_SUCCESS && (!nsrc || !ndest))
 			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4512: "
-				"__osm_mpr_rcv_get_end_points failed, not enough GIDs "
+				"mpr_rcv_get_end_points failed, not enough GIDs "
 				"(nsrc %d ndest %d)\n", nsrc, ndest);
 		cl_plock_release(sa->p_lock);
 		if (sa_status == IB_SA_MAD_STATUS_SUCCESS)
@@ -1511,13 +1481,11 @@ void osm_mpr_rcv_process(IN void *context, IN void *data)
 
 	/* APM request */
 	if (nsrc == 2 && ndest == 2 && (p_mpr->num_path & 0x7F) == 2)
-		__osm_mpr_rcv_get_apm_paths(sa, p_mpr, requester_port,
-					    pp_ports, p_sa_mad->comp_mask,
-					    &pr_list);
+		mpr_rcv_get_apm_paths(sa, p_mpr, requester_port, pp_ports,
+				      p_sa_mad->comp_mask, &pr_list);
 	else
-		__osm_mpr_rcv_process_pairs(sa, p_mpr, requester_port,
-					    pp_ports, nsrc, ndest,
-					    p_sa_mad->comp_mask, &pr_list);
+		mpr_rcv_process_pairs(sa, p_mpr, requester_port, pp_ports,
+				      nsrc, ndest, p_sa_mad->comp_mask, &pr_list);
 
 	cl_plock_release(sa->p_lock);
 
diff --git a/opensm/opensm/osm_sa_node_record.c b/opensm/opensm/osm_sa_node_record.c
index 4df2c91..8afc252 100644
--- a/opensm/opensm/osm_sa_node_record.c
+++ b/opensm/opensm/osm_sa_node_record.c
@@ -70,10 +70,9 @@ typedef struct osm_nr_search_ctxt {
 /**********************************************************************
  **********************************************************************/
 static ib_api_status_t
-__osm_nr_rcv_new_nr(IN osm_sa_t * sa,
-		    IN const osm_node_t * const p_node,
-		    IN cl_qlist_t * const p_list,
-		    IN ib_net64_t const port_guid, IN ib_net16_t const lid)
+nr_rcv_new_nr(IN osm_sa_t * sa, IN const osm_node_t * const p_node,
+	      IN cl_qlist_t * const p_list, IN ib_net64_t const port_guid,
+	      IN ib_net16_t const lid)
 {
 	osm_nr_item_t *p_rec_item;
 	ib_api_status_t status = IB_SUCCESS;
@@ -112,12 +111,11 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_nr_rcv_create_nr(IN osm_sa_t * sa,
-		       IN osm_node_t * const p_node,
-		       IN cl_qlist_t * const p_list,
-		       IN ib_net64_t const match_port_guid,
-		       IN ib_net16_t const match_lid,
-		       IN const osm_physp_t * const p_req_physp)
+nr_rcv_create_nr(IN osm_sa_t * sa, IN osm_node_t * const p_node,
+		 IN cl_qlist_t * const p_list,
+		 IN ib_net64_t const match_port_guid,
+		 IN ib_net16_t const match_lid,
+		 IN const osm_physp_t * const p_req_physp)
 {
 	const osm_physp_t *p_physp;
 	uint8_t port_num;
@@ -179,7 +177,7 @@ __osm_nr_rcv_create_nr(IN osm_sa_t * sa,
 				continue;
 		}
 
-		__osm_nr_rcv_new_nr(sa, p_node, p_list, port_guid, base_lid);
+		nr_rcv_new_nr(sa, p_node, p_list, port_guid, base_lid);
 
 	}
 
@@ -189,7 +187,7 @@ __osm_nr_rcv_create_nr(IN osm_sa_t * sa,
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_nr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item, IN void *context)
+nr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item, IN void *context)
 {
 	const osm_nr_search_ctxt_t *const p_ctxt =
 	    (osm_nr_search_ctxt_t *) context;
@@ -280,8 +278,8 @@ __osm_nr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item, IN void *context)
 			goto Exit;
 	}
 
-	__osm_nr_rcv_create_nr(sa, p_node, p_ctxt->p_list,
-			       match_port_guid, match_lid, p_req_physp);
+	nr_rcv_create_nr(sa, p_node, p_ctxt->p_list, match_port_guid,
+			 match_lid, p_req_physp);
 
 Exit:
 	OSM_LOG_EXIT(p_ctxt->sa->p_log);
@@ -343,8 +341,8 @@ void osm_nr_rcv_process(IN void *ctx, IN void *data)
 
 	cl_plock_acquire(sa->p_lock);
 
-	cl_qmap_apply_func(&sa->p_subn->node_guid_tbl,
-			   __osm_nr_rcv_by_comp_mask, &context);
+	cl_qmap_apply_func(&sa->p_subn->node_guid_tbl, nr_rcv_by_comp_mask,
+			   &context);
 
 	cl_plock_release(sa->p_lock);
 
diff --git a/opensm/opensm/osm_sa_path_record.c b/opensm/opensm/osm_sa_path_record.c
index 978c1a5..fa099d3 100644
--- a/opensm/opensm/osm_sa_path_record.c
+++ b/opensm/opensm/osm_sa_path_record.c
@@ -87,7 +87,7 @@ typedef struct osm_path_parms {
 /**********************************************************************
  **********************************************************************/
 static inline boolean_t
-__osm_sa_path_rec_is_tavor_port(IN const osm_port_t * const p_port)
+sa_path_rec_is_tavor_port(IN const osm_port_t * const p_port)
 {
 	osm_node_t const *p_node;
 	ib_net32_t vend_id;
@@ -105,16 +105,16 @@ __osm_sa_path_rec_is_tavor_port(IN const osm_port_t * const p_port)
 /**********************************************************************
  **********************************************************************/
 static boolean_t
-__osm_sa_path_rec_apply_tavor_mtu_limit(IN const ib_path_rec_t * const p_pr,
-					IN const osm_port_t * const p_src_port,
-					IN const osm_port_t * const p_dest_port,
-					IN const ib_net64_t comp_mask)
+sa_path_rec_apply_tavor_mtu_limit(IN const ib_path_rec_t * const p_pr,
+				  IN const osm_port_t * const p_src_port,
+				  IN const osm_port_t * const p_dest_port,
+				  IN const ib_net64_t comp_mask)
 {
 	uint8_t required_mtu;
 
 	/* only if at least one of the ports is a Tavor device */
-	if (!__osm_sa_path_rec_is_tavor_port(p_src_port) &&
-	    !__osm_sa_path_rec_is_tavor_port(p_dest_port))
+	if (!sa_path_rec_is_tavor_port(p_src_port) &&
+	    !sa_path_rec_is_tavor_port(p_dest_port))
 		return (FALSE);
 
 	/*
@@ -157,13 +157,12 @@ __osm_sa_path_rec_apply_tavor_mtu_limit(IN const ib_path_rec_t * const p_pr,
 /**********************************************************************
  **********************************************************************/
 static ib_api_status_t
-__osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
-			    IN const ib_path_rec_t * const p_pr,
-			    IN const osm_port_t * const p_src_port,
-			    IN const osm_port_t * const p_dest_port,
-			    IN const uint16_t dest_lid_ho,
-			    IN const ib_net64_t comp_mask,
-			    OUT osm_path_parms_t * const p_parms)
+pr_rcv_get_path_parms(IN osm_sa_t * sa, IN const ib_path_rec_t * const p_pr,
+		      IN const osm_port_t * const p_src_port,
+		      IN const osm_port_t * const p_dest_port,
+		      IN const uint16_t dest_lid_ho,
+		      IN const ib_net64_t comp_mask,
+		      OUT osm_path_parms_t * const p_parms)
 {
 	const osm_node_t *p_node;
 	const osm_physp_t *p_physp;
@@ -209,8 +208,8 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 	   port MTU with 1K.
 	 */
 	if (sa->p_subn->opt.enable_quirks &&
-	    __osm_sa_path_rec_apply_tavor_mtu_limit(p_pr, p_src_port,
-						    p_dest_port, comp_mask))
+	    sa_path_rec_apply_tavor_mtu_limit(p_pr, p_src_port, p_dest_port,
+					      comp_mask))
 		if (mtu > IB_MTU_LEN_1024) {
 			mtu = IB_MTU_LEN_1024;
 			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
@@ -752,15 +751,13 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_pr_rcv_build_pr(IN osm_sa_t * sa,
-		      IN const osm_port_t * const p_src_port,
-		      IN const osm_port_t * const p_dest_port,
-		      IN const ib_gid_t * const p_dgid,
-		      IN const uint16_t src_lid_ho,
-		      IN const uint16_t dest_lid_ho,
-		      IN const uint8_t preference,
-		      IN const osm_path_parms_t * const p_parms,
-		      OUT ib_path_rec_t * const p_pr)
+pr_rcv_build_pr(IN osm_sa_t * sa, IN const osm_port_t * const p_src_port,
+		IN const osm_port_t * const p_dest_port,
+		IN const ib_gid_t * const p_dgid,
+		IN const uint16_t src_lid_ho, IN const uint16_t dest_lid_ho,
+		IN const uint8_t preference,
+		IN const osm_path_parms_t * const p_parms,
+		OUT ib_path_rec_t * const p_pr)
 {
 	const osm_physp_t *p_src_physp;
 	const osm_physp_t *p_dest_physp;
@@ -821,15 +818,14 @@ __osm_pr_rcv_build_pr(IN osm_sa_t * sa,
 /**********************************************************************
  **********************************************************************/
 static osm_pr_item_t *
-__osm_pr_rcv_get_lid_pair_path(IN osm_sa_t * sa,
-			       IN const ib_path_rec_t * const p_pr,
-			       IN const osm_port_t * const p_src_port,
-			       IN const osm_port_t * const p_dest_port,
-			       IN const ib_gid_t * const p_dgid,
-			       IN const uint16_t src_lid_ho,
-			       IN const uint16_t dest_lid_ho,
-			       IN const ib_net64_t comp_mask,
-			       IN const uint8_t preference)
+pr_rcv_get_lid_pair_path(IN osm_sa_t * sa, IN const ib_path_rec_t * const p_pr,
+			 IN const osm_port_t * const p_src_port,
+			 IN const osm_port_t * const p_dest_port,
+			 IN const ib_gid_t * const p_dgid,
+			 IN const uint16_t src_lid_ho,
+			 IN const uint16_t dest_lid_ho,
+			 IN const ib_net64_t comp_mask,
+			 IN const uint8_t preference)
 {
 	osm_path_parms_t path_parms;
 	osm_path_parms_t rev_path_parms;
@@ -849,9 +845,8 @@ __osm_pr_rcv_get_lid_pair_path(IN osm_sa_t * sa,
 	}
 	memset(p_pr_item, 0, sizeof(*p_pr_item));
 
-	status = __osm_pr_rcv_get_path_parms(sa, p_pr, p_src_port,
-					     p_dest_port, dest_lid_ho,
-					     comp_mask, &path_parms);
+	status = pr_rcv_get_path_parms(sa, p_pr, p_src_port, p_dest_port,
+				       dest_lid_ho, comp_mask, &path_parms);
 
 	if (status != IB_SUCCESS) {
 		free(p_pr_item);
@@ -860,10 +855,9 @@ __osm_pr_rcv_get_lid_pair_path(IN osm_sa_t * sa,
 	}
 
 	/* now try the reversible path */
-	rev_path_status = __osm_pr_rcv_get_path_parms(sa, p_pr, p_dest_port,
-						      p_src_port, src_lid_ho,
-						      comp_mask,
-						      &rev_path_parms);
+	rev_path_status = pr_rcv_get_path_parms(sa, p_pr, p_dest_port,
+						p_src_port, src_lid_ho,
+						comp_mask, &rev_path_parms);
 	path_parms.reversible = (rev_path_status == IB_SUCCESS);
 
 	/* did we get a Reversible Path compmask ? */
@@ -883,9 +877,9 @@ __osm_pr_rcv_get_lid_pair_path(IN osm_sa_t * sa,
 		}
 	}
 
-	__osm_pr_rcv_build_pr(sa, p_src_port, p_dest_port, p_dgid,
-			      src_lid_ho, dest_lid_ho, preference, &path_parms,
-			      &p_pr_item->path_rec);
+	pr_rcv_build_pr(sa, p_src_port, p_dest_port, p_dgid, src_lid_ho,
+			dest_lid_ho, preference, &path_parms,
+			&p_pr_item->path_rec);
 
 Exit:
 	OSM_LOG_EXIT(sa->p_log);
@@ -895,14 +889,13 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_pr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
-				 IN const osm_madw_t * const p_madw,
-				 IN const osm_port_t * const p_req_port,
-				 IN const osm_port_t * const p_src_port,
-				 IN const osm_port_t * const p_dest_port,
-				 IN const ib_gid_t * const p_dgid,
-				 IN const ib_net64_t comp_mask,
-				 IN cl_qlist_t * const p_list)
+pr_rcv_get_port_pair_paths(IN osm_sa_t * sa, IN const osm_madw_t * const p_madw,
+			   IN const osm_port_t * const p_req_port,
+			   IN const osm_port_t * const p_src_port,
+			   IN const osm_port_t * const p_dest_port,
+			   IN const ib_gid_t * const p_dgid,
+			   IN const ib_net64_t comp_mask,
+			   IN cl_qlist_t * const p_list)
 {
 	const ib_path_rec_t *p_pr;
 	const ib_sa_mad_t *p_sa_mad;
@@ -1041,13 +1034,10 @@ __osm_pr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
 		   These paths are "fully redundant"
 		 */
 
-		p_pr_item = __osm_pr_rcv_get_lid_pair_path(sa, p_pr,
-							   p_src_port,
-							   p_dest_port, p_dgid,
-							   src_lid_ho,
-							   dest_lid_ho,
-							   comp_mask,
-							   preference);
+		p_pr_item = pr_rcv_get_lid_pair_path(sa, p_pr, p_src_port,
+						     p_dest_port, p_dgid,
+						     src_lid_ho, dest_lid_ho,
+						     comp_mask, preference);
 
 		if (p_pr_item) {
 			cl_qlist_insert_tail(p_list, &p_pr_item->list_item);
@@ -1107,13 +1097,10 @@ __osm_pr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
 		if (src_offset == dest_offset)
 			continue;	/* already reported */
 
-		p_pr_item = __osm_pr_rcv_get_lid_pair_path(sa, p_pr,
-							   p_src_port,
-							   p_dest_port, p_dgid,
-							   src_lid_ho,
-							   dest_lid_ho,
-							   comp_mask,
-							   preference);
+		p_pr_item = pr_rcv_get_lid_pair_path(sa, p_pr, p_src_port,
+						     p_dest_port, p_dgid,
+						     src_lid_ho, dest_lid_ho,
+						     comp_mask, preference);
 
 		if (p_pr_item) {
 			cl_qlist_insert_tail(p_list, &p_pr_item->list_item);
@@ -1128,11 +1115,10 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static ib_net16_t
-__osm_pr_rcv_get_end_points(IN osm_sa_t * sa,
-			    IN const osm_madw_t * const p_madw,
-			    OUT const osm_port_t ** const pp_src_port,
-			    OUT const osm_port_t ** const pp_dest_port,
-			    OUT ib_gid_t * const p_dgid)
+pr_rcv_get_end_points(IN osm_sa_t * sa, IN const osm_madw_t * const p_madw,
+		      OUT const osm_port_t ** const pp_src_port,
+		      OUT const osm_port_t ** const pp_dest_port,
+		      OUT ib_gid_t * const p_dgid)
 {
 	const ib_path_rec_t *p_pr;
 	const ib_sa_mad_t *p_sa_mad;
@@ -1337,12 +1323,11 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_pr_rcv_process_world(IN osm_sa_t * sa,
-			   IN const osm_madw_t * const p_madw,
-			   IN const osm_port_t * const requester_port,
-			   IN const ib_gid_t * const p_dgid,
-			   IN const ib_net64_t comp_mask,
-			   IN cl_qlist_t * const p_list)
+pr_rcv_process_world(IN osm_sa_t * sa, IN const osm_madw_t * const p_madw,
+		     IN const osm_port_t * const requester_port,
+		     IN const ib_gid_t * const p_dgid,
+		     IN const ib_net64_t comp_mask,
+		     IN cl_qlist_t * const p_list)
 {
 	const cl_qmap_t *p_tbl;
 	const osm_port_t *p_dest_port;
@@ -1364,11 +1349,9 @@ __osm_pr_rcv_process_world(IN osm_sa_t * sa,
 	while (p_dest_port != (osm_port_t *) cl_qmap_end(p_tbl)) {
 		p_src_port = (osm_port_t *) cl_qmap_head(p_tbl);
 		while (p_src_port != (osm_port_t *) cl_qmap_end(p_tbl)) {
-			__osm_pr_rcv_get_port_pair_paths(sa, p_madw,
-							 requester_port,
-							 p_src_port,
-							 p_dest_port, p_dgid,
-							 comp_mask, p_list);
+			pr_rcv_get_port_pair_paths(sa, p_madw, requester_port,
+						   p_src_port, p_dest_port,
+						   p_dgid, comp_mask, p_list);
 
 			p_src_port =
 			    (osm_port_t *) cl_qmap_next(&p_src_port->map_item);
@@ -1384,14 +1367,13 @@ __osm_pr_rcv_process_world(IN osm_sa_t * sa,
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_pr_rcv_process_half(IN osm_sa_t * sa,
-			  IN const osm_madw_t * const p_madw,
-			  IN const osm_port_t * const requester_port,
-			  IN const osm_port_t * const p_src_port,
-			  IN const osm_port_t * const p_dest_port,
-			  IN const ib_gid_t * const p_dgid,
-			  IN const ib_net64_t comp_mask,
-			  IN cl_qlist_t * const p_list)
+pr_rcv_process_half(IN osm_sa_t * sa, IN const osm_madw_t * const p_madw,
+		    IN const osm_port_t * const requester_port,
+		    IN const osm_port_t * const p_src_port,
+		    IN const osm_port_t * const p_dest_port,
+		    IN const ib_gid_t * const p_dgid,
+		    IN const ib_net64_t comp_mask,
+		    IN cl_qlist_t * const p_list)
 {
 	const cl_qmap_t *p_tbl;
 	const osm_port_t *p_port;
@@ -1411,11 +1393,9 @@ __osm_pr_rcv_process_half(IN osm_sa_t * sa,
 		 */
 		p_port = (osm_port_t *) cl_qmap_head(p_tbl);
 		while (p_port != (osm_port_t *) cl_qmap_end(p_tbl)) {
-			__osm_pr_rcv_get_port_pair_paths(sa, p_madw,
-							 requester_port,
-							 p_src_port, p_port,
-							 p_dgid, comp_mask,
-							 p_list);
+			pr_rcv_get_port_pair_paths(sa, p_madw, requester_port,
+						   p_src_port, p_port, p_dgid,
+						   comp_mask, p_list);
 			p_port = (osm_port_t *) cl_qmap_next(&p_port->map_item);
 		}
 	} else {
@@ -1424,10 +1404,9 @@ __osm_pr_rcv_process_half(IN osm_sa_t * sa,
 		 */
 		p_port = (osm_port_t *) cl_qmap_head(p_tbl);
 		while (p_port != (osm_port_t *) cl_qmap_end(p_tbl)) {
-			__osm_pr_rcv_get_port_pair_paths(sa, p_madw,
-							 requester_port, p_port,
-							 p_dest_port, p_dgid,
-							 comp_mask, p_list);
+			pr_rcv_get_port_pair_paths(sa, p_madw, requester_port,
+						   p_port, p_dest_port, p_dgid,
+						   comp_mask, p_list);
 			p_port = (osm_port_t *) cl_qmap_next(&p_port->map_item);
 		}
 	}
@@ -1438,20 +1417,18 @@ __osm_pr_rcv_process_half(IN osm_sa_t * sa,
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_pr_rcv_process_pair(IN osm_sa_t * sa,
-			  IN const osm_madw_t * const p_madw,
-			  IN const osm_port_t * const requester_port,
-			  IN const osm_port_t * const p_src_port,
-			  IN const osm_port_t * const p_dest_port,
-			  IN const ib_gid_t * const p_dgid,
-			  IN const ib_net64_t comp_mask,
-			  IN cl_qlist_t * const p_list)
+pr_rcv_process_pair(IN osm_sa_t * sa, IN const osm_madw_t * const p_madw,
+		    IN const osm_port_t * const requester_port,
+		    IN const osm_port_t * const p_src_port,
+		    IN const osm_port_t * const p_dest_port,
+		    IN const ib_gid_t * const p_dgid,
+		    IN const ib_net64_t comp_mask,
+		    IN cl_qlist_t * const p_list)
 {
 	OSM_LOG_ENTER(sa->p_log);
 
-	__osm_pr_rcv_get_port_pair_paths(sa, p_madw, requester_port,
-					 p_src_port, p_dest_port, p_dgid,
-					 comp_mask, p_list);
+	pr_rcv_get_port_pair_paths(sa, p_madw, requester_port, p_src_port,
+				   p_dest_port, p_dgid, comp_mask, p_list);
 
 	OSM_LOG_EXIT(sa->p_log);
 }
@@ -1507,9 +1484,8 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static ib_api_status_t
-__osm_pr_match_mgrp_attributes(IN osm_sa_t * sa,
-			       IN const osm_madw_t * const p_madw,
-			       IN const osm_mgrp_t * const p_mgrp)
+pr_match_mgrp_attributes(IN osm_sa_t * sa, IN const osm_madw_t * const p_madw,
+			 IN const osm_mgrp_t * const p_mgrp)
 {
 	const ib_path_rec_t *p_pr;
 	const ib_sa_mad_t *p_sa_mad;
@@ -1573,8 +1549,7 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static int
-__osm_pr_rcv_check_mcast_dest(IN osm_sa_t * sa,
-			      IN const osm_madw_t * const p_madw)
+pr_rcv_check_mcast_dest(IN osm_sa_t * sa, IN const osm_madw_t * const p_madw)
 {
 	const ib_path_rec_t *p_pr;
 	const ib_sa_mad_t *p_sa_mad;
@@ -1667,7 +1642,7 @@ void osm_pr_rcv_process(IN void *context, IN void *data)
 	cl_plock_acquire(sa->p_lock);
 
 	/* Handle multicast destinations separately */
-	if ((ret = __osm_pr_rcv_check_mcast_dest(sa, p_madw)) < 0) {
+	if ((ret = pr_rcv_check_mcast_dest(sa, p_madw)) < 0) {
 		/* Multicast DGID with unicast DLID */
 		cl_plock_release(sa->p_lock);
 		osm_sa_send_error(sa, p_madw, IB_MAD_STATUS_INVALID_FIELD);
@@ -1679,9 +1654,8 @@ void osm_pr_rcv_process(IN void *context, IN void *data)
 
 	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Unicast destination requested\n");
 
-	sa_status = __osm_pr_rcv_get_end_points(sa, p_madw,
-						&p_src_port, &p_dest_port,
-						&dgid);
+	sa_status = pr_rcv_get_end_points(sa, p_madw, &p_src_port, &p_dest_port,
+					  &dgid);
 
 	if (sa_status == IB_SA_MAD_STATUS_SUCCESS) {
 		/*
@@ -1690,35 +1664,28 @@ void osm_pr_rcv_process(IN void *context, IN void *data)
 		 */
 		if (p_src_port) {
 			if (p_dest_port)
-				__osm_pr_rcv_process_pair(sa, p_madw,
-							  requester_port,
-							  p_src_port,
-							  p_dest_port, &dgid,
-							  p_sa_mad->comp_mask,
-							  &pr_list);
+				pr_rcv_process_pair(sa, p_madw, requester_port,
+						    p_src_port, p_dest_port,
+						    &dgid, p_sa_mad->comp_mask,
+						    &pr_list);
 			else
-				__osm_pr_rcv_process_half(sa, p_madw,
-							  requester_port,
-							  p_src_port, NULL,
-							  &dgid,
-							  p_sa_mad->comp_mask,
-							  &pr_list);
+				pr_rcv_process_half(sa, p_madw, requester_port,
+						    p_src_port, NULL, &dgid,
+						    p_sa_mad->comp_mask,
+						    &pr_list);
 		} else {
 			if (p_dest_port)
-				__osm_pr_rcv_process_half(sa, p_madw,
-							  requester_port, NULL,
-							  p_dest_port, &dgid,
-							  p_sa_mad->comp_mask,
-							  &pr_list);
+				pr_rcv_process_half(sa, p_madw, requester_port,
+						    NULL, p_dest_port, &dgid,
+						    p_sa_mad->comp_mask,
+						    &pr_list);
 			else
 				/*
 				   Katie, bar the door!
 				 */
-				__osm_pr_rcv_process_world(sa, p_madw,
-							   requester_port,
-							   &dgid,
-							   p_sa_mad->comp_mask,
-							   &pr_list);
+				pr_rcv_process_world(sa, p_madw, requester_port,
+						     &dgid, p_sa_mad->comp_mask,
+						     &pr_list);
 		}
 	}
 	goto Unlock;
@@ -1740,7 +1707,7 @@ McastDest:
 			goto Unlock;
 
 		/* Make sure the rest of the PathRecord matches the MC group attributes */
-		status = __osm_pr_match_mgrp_attributes(sa, p_madw, p_mgrp);
+		status = pr_match_mgrp_attributes(sa, p_madw, p_mgrp);
 		if (status != IB_SUCCESS) {
 			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F19: "
 				"MC group attributes don't match PathRecord request\n");
diff --git a/opensm/opensm/osm_sa_pkey_record.c b/opensm/opensm/osm_sa_pkey_record.c
index 70c6047..b19329b 100644
--- a/opensm/opensm/osm_sa_pkey_record.c
+++ b/opensm/opensm/osm_sa_pkey_record.c
@@ -67,10 +67,8 @@ typedef struct osm_pkey_search_ctxt {
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_pkey_create(IN osm_sa_t * sa,
-		     IN osm_physp_t * const p_physp,
-		     IN osm_pkey_search_ctxt_t * const p_ctxt,
-		     IN uint16_t block)
+sa_pkey_create(IN osm_sa_t * sa, IN osm_physp_t * const p_physp,
+	       IN osm_pkey_search_ctxt_t * const p_ctxt, IN uint16_t block)
 {
 	osm_pkey_item_t *p_rec_item;
 	uint16_t lid;
@@ -114,9 +112,8 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_pkey_check_physp(IN osm_sa_t * sa,
-			  IN osm_physp_t * const p_physp,
-			  osm_pkey_search_ctxt_t * const p_ctxt)
+sa_pkey_check_physp(IN osm_sa_t * sa, IN osm_physp_t * const p_physp,
+		    osm_pkey_search_ctxt_t * const p_ctxt)
 {
 	ib_net64_t comp_mask = p_ctxt->comp_mask;
 	uint16_t block, num_blocks;
@@ -125,13 +122,13 @@ __osm_sa_pkey_check_physp(IN osm_sa_t * sa,
 
 	/* we got here with the phys port - all is left is to get the right block */
 	if (comp_mask & IB_PKEY_COMPMASK_BLOCK) {
-		__osm_sa_pkey_create(sa, p_physp, p_ctxt, p_ctxt->block_num);
+		sa_pkey_create(sa, p_physp, p_ctxt, p_ctxt->block_num);
 	} else {
 		num_blocks =
 		    osm_pkey_tbl_get_num_blocks(osm_physp_get_pkey_tbl
 						(p_physp));
 		for (block = 0; block < num_blocks; block++) {
-			__osm_sa_pkey_create(sa, p_physp, p_ctxt, block);
+			sa_pkey_create(sa, p_physp, p_ctxt, block);
 		}
 	}
 
@@ -141,9 +138,8 @@ __osm_sa_pkey_check_physp(IN osm_sa_t * sa,
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_pkey_by_comp_mask(IN osm_sa_t * sa,
-			   IN const osm_port_t * const p_port,
-			   osm_pkey_search_ctxt_t * const p_ctxt)
+sa_pkey_by_comp_mask(IN osm_sa_t * sa, IN const osm_port_t * const p_port,
+		     osm_pkey_search_ctxt_t * const p_ctxt)
 {
 	const ib_pkey_table_record_t *p_rcvd_rec;
 	ib_net64_t comp_mask;
@@ -179,8 +175,7 @@ __osm_sa_pkey_by_comp_mask(IN osm_sa_t * sa,
 			if (p_physp &&
 			    (osm_physp_share_pkey
 			     (sa->p_log, p_req_physp, p_physp)))
-				__osm_sa_pkey_check_physp(sa, p_physp,
-							  p_ctxt);
+				sa_pkey_check_physp(sa, p_physp, p_ctxt);
 		} else {
 			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4603: "
 				"Given Physical Port Number: 0x%X is out of range should be < 0x%X\n",
@@ -202,7 +197,7 @@ __osm_sa_pkey_by_comp_mask(IN osm_sa_t * sa,
 			    (sa->p_log, p_req_physp, p_physp))
 				continue;
 
-			__osm_sa_pkey_check_physp(sa, p_physp, p_ctxt);
+			sa_pkey_check_physp(sa, p_physp, p_ctxt);
 		}
 	}
 Exit:
@@ -212,14 +207,13 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_pkey_by_comp_mask_cb(IN cl_map_item_t * const p_map_item,
-			      IN void *context)
+sa_pkey_by_comp_mask_cb(IN cl_map_item_t * const p_map_item, IN void *context)
 {
 	const osm_port_t *const p_port = (osm_port_t *) p_map_item;
 	osm_pkey_search_ctxt_t *const p_ctxt =
 	    (osm_pkey_search_ctxt_t *) context;
 
-	__osm_sa_pkey_by_comp_mask(p_ctxt->sa, p_port, p_ctxt);
+	sa_pkey_by_comp_mask(p_ctxt->sa, p_port, p_ctxt);
 }
 
 /**********************************************************************
@@ -325,11 +319,10 @@ void osm_pkey_rec_rcv_process(IN void *ctx, IN void *data)
 		/* if we got a unique port - no need for a port search */
 		if (p_port)
 			/* this does the loop on all the port phys ports */
-			__osm_sa_pkey_by_comp_mask(sa, p_port, &context);
+			sa_pkey_by_comp_mask(sa, p_port, &context);
 		else
 			cl_qmap_apply_func(&sa->p_subn->port_guid_tbl,
-					   __osm_sa_pkey_by_comp_mask_cb,
-					   &context);
+					   sa_pkey_by_comp_mask_cb, &context);
 	}
 
 	cl_plock_release(sa->p_lock);
diff --git a/opensm/opensm/osm_sa_portinfo_record.c b/opensm/opensm/osm_sa_portinfo_record.c
index 753c3db..79bfaf2 100644
--- a/opensm/opensm/osm_sa_portinfo_record.c
+++ b/opensm/opensm/osm_sa_portinfo_record.c
@@ -75,9 +75,8 @@ typedef struct osm_pir_search_ctxt {
 /**********************************************************************
  **********************************************************************/
 static ib_api_status_t
-__osm_pir_rcv_new_pir(IN osm_sa_t * sa,
-		      IN const osm_physp_t * const p_physp,
-		      IN cl_qlist_t * const p_list, IN ib_net16_t const lid)
+pir_rcv_new_pir(IN osm_sa_t * sa, IN const osm_physp_t * const p_physp,
+		IN cl_qlist_t * const p_list, IN ib_net16_t const lid)
 {
 	osm_pir_item_t *p_rec_item;
 	ib_api_status_t status = IB_SUCCESS;
@@ -114,9 +113,8 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_pir_create(IN osm_sa_t * sa,
-		    IN const osm_physp_t * const p_physp,
-		    IN osm_pir_search_ctxt_t * const p_ctxt)
+sa_pir_create(IN osm_sa_t * sa, IN const osm_physp_t * const p_physp,
+	      IN osm_pir_search_ctxt_t * const p_ctxt)
 {
 	uint8_t lmc;
 	uint16_t max_lid_ho;
@@ -154,8 +152,7 @@ __osm_sa_pir_create(IN osm_sa_t * sa,
 			goto Exit;
 	}
 
-	__osm_pir_rcv_new_pir(sa, p_physp, p_ctxt->p_list,
-			      cl_hton16(base_lid_ho));
+	pir_rcv_new_pir(sa, p_physp, p_ctxt->p_list, cl_hton16(base_lid_ho));
 
 Exit:
 	OSM_LOG_EXIT(sa->p_log);
@@ -164,9 +161,8 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_pir_check_physp(IN osm_sa_t * sa,
-			 IN const osm_physp_t * const p_physp,
-			 osm_pir_search_ctxt_t * const p_ctxt)
+sa_pir_check_physp(IN osm_sa_t * sa, IN const osm_physp_t * const p_physp,
+		   osm_pir_search_ctxt_t * const p_ctxt)
 {
 	const ib_portinfo_record_t *p_rcvd_rec;
 	ib_net64_t comp_mask;
@@ -387,7 +383,7 @@ __osm_sa_pir_check_physp(IN osm_sa_t * sa,
 			goto Exit;
 	}
 
-	__osm_sa_pir_create(sa, p_physp, p_ctxt);
+	sa_pir_create(sa, p_physp, p_ctxt);
 
 Exit:
 	OSM_LOG_EXIT(sa->p_log);
@@ -396,9 +392,8 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_pir_by_comp_mask(IN osm_sa_t * sa,
-			  IN osm_node_t * const p_node,
-			  osm_pir_search_ctxt_t * const p_ctxt)
+sa_pir_by_comp_mask(IN osm_sa_t * sa, IN osm_node_t * const p_node,
+		    osm_pir_search_ctxt_t * const p_ctxt)
 {
 	const ib_portinfo_record_t *p_rcvd_rec;
 	ib_net64_t comp_mask;
@@ -425,8 +420,7 @@ __osm_sa_pir_by_comp_mask(IN osm_sa_t * sa,
 			if (p_physp &&
 			    osm_physp_share_pkey(sa->p_log, p_req_physp,
 						 p_physp))
-				__osm_sa_pir_check_physp(sa, p_physp,
-							 p_ctxt);
+				sa_pir_check_physp(sa, p_physp, p_ctxt);
 		}
 	} else {
 		for (port_num = 0; port_num < num_ports; port_num++) {
@@ -441,7 +435,7 @@ __osm_sa_pir_by_comp_mask(IN osm_sa_t * sa,
 			    (sa->p_log, p_req_physp, p_physp))
 				continue;
 
-			__osm_sa_pir_check_physp(sa, p_physp, p_ctxt);
+			sa_pir_check_physp(sa, p_physp, p_ctxt);
 		}
 	}
 
@@ -451,13 +445,12 @@ __osm_sa_pir_by_comp_mask(IN osm_sa_t * sa,
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_pir_by_comp_mask_cb(IN cl_map_item_t * const p_map_item,
-			     IN void *context)
+sa_pir_by_comp_mask_cb(IN cl_map_item_t * const p_map_item, IN void *context)
 {
 	osm_node_t *const p_node = (osm_node_t *) p_map_item;
 	osm_pir_search_ctxt_t *const p_ctxt = (osm_pir_search_ctxt_t *) context;
 
-	__osm_sa_pir_by_comp_mask(p_ctxt->sa, p_node, p_ctxt);
+	sa_pir_by_comp_mask(p_ctxt->sa, p_node, p_ctxt);
 }
 
 /**********************************************************************
@@ -560,12 +553,10 @@ void osm_pir_rcv_process(IN void *ctx, IN void *data)
 
 	if (status == IB_SUCCESS) {
 		if (p_port)
-			__osm_sa_pir_by_comp_mask(sa, p_port->p_node,
-						  &context);
+			sa_pir_by_comp_mask(sa, p_port->p_node, &context);
 		else
 			cl_qmap_apply_func(&sa->p_subn->node_guid_tbl,
-					   __osm_sa_pir_by_comp_mask_cb,
-					   &context);
+					   sa_pir_by_comp_mask_cb, &context);
 	}
 
 	cl_plock_release(sa->p_lock);
diff --git a/opensm/opensm/osm_sa_service_record.c b/opensm/opensm/osm_sa_service_record.c
index 66b4cb7..0a6d681 100644
--- a/opensm/opensm/osm_sa_service_record.c
+++ b/opensm/opensm/osm_sa_service_record.c
@@ -205,9 +205,8 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sr_rcv_respond(IN osm_sa_t * sa,
-		     IN osm_madw_t * const p_madw,
-		     IN cl_qlist_t * const p_list)
+sr_rcv_respond(IN osm_sa_t * sa, IN osm_madw_t * const p_madw,
+	       IN cl_qlist_t * const p_list)
 {
 	/* p923 - The ServiceKey shall be set to 0, except in the case of
 	   a trusted request.
@@ -516,7 +515,7 @@ osm_sr_rcv_process_get_method(IN osm_sa_t * sa,
 		goto Exit;
 	}
 
-	__osm_sr_rcv_respond(sa, p_madw, &sr_match_item.sr_list);
+	sr_rcv_respond(sa, p_madw, &sr_match_item.sr_list);
 
 Exit:
 	OSM_LOG_EXIT(sa->p_log);
@@ -626,7 +625,7 @@ osm_sr_rcv_process_set_method(IN osm_sa_t * sa,
 
 	cl_qlist_insert_tail(&sr_list, &p_sr_item->list_item);
 
-	__osm_sr_rcv_respond(sa, p_madw, &sr_list);
+	sr_rcv_respond(sa, p_madw, &sr_list);
 
 Exit:
 	OSM_LOG_EXIT(sa->p_log);
@@ -635,8 +634,7 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-osm_sr_rcv_process_delete_method(IN osm_sa_t * sa,
-				 IN osm_madw_t * const p_madw)
+sr_rcv_process_delete_method(IN osm_sa_t * sa, IN osm_madw_t * const p_madw)
 {
 	ib_sa_mad_t *p_sa_mad;
 	ib_service_record_t *p_recvd_service_rec;
@@ -695,7 +693,7 @@ osm_sr_rcv_process_delete_method(IN osm_sa_t * sa,
 	if (p_svcr)
 		osm_svcr_delete(p_svcr);
 
-	__osm_sr_rcv_respond(sa, p_madw, &sr_list);
+	sr_rcv_respond(sa, p_madw, &sr_list);
 
 Exit:
 	OSM_LOG_EXIT(sa->p_log);
@@ -740,7 +738,7 @@ void osm_sr_rcv_process(IN void *context, IN void *data)
 					  IB_SA_MAD_STATUS_REQ_INVALID);
 			goto Exit;
 		}
-		osm_sr_rcv_process_delete_method(sa, p_madw);
+		sr_rcv_process_delete_method(sa, p_madw);
 		break;
 	case IB_MAD_METHOD_GET:
 	case IB_MAD_METHOD_GETTABLE:
diff --git a/opensm/opensm/osm_sa_slvl_record.c b/opensm/opensm/osm_sa_slvl_record.c
index 0550fc1..d65c60c 100644
--- a/opensm/opensm/osm_sa_slvl_record.c
+++ b/opensm/opensm/osm_sa_slvl_record.c
@@ -74,10 +74,8 @@ typedef struct osm_slvl_search_ctxt {
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_slvl_create(IN osm_sa_t * sa,
-		     IN const osm_physp_t * const p_physp,
-		     IN osm_slvl_search_ctxt_t * const p_ctxt,
-		     IN uint8_t in_port_idx)
+sa_slvl_create(IN osm_sa_t * sa, IN const osm_physp_t * const p_physp,
+	       IN osm_slvl_search_ctxt_t * const p_ctxt, IN uint8_t in_port_idx)
 {
 	osm_slvl_item_t *p_rec_item;
 	uint16_t lid;
@@ -121,9 +119,8 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_slvl_by_comp_mask(IN osm_sa_t * sa,
-			   IN const osm_port_t * const p_port,
-			   osm_slvl_search_ctxt_t * const p_ctxt)
+sa_slvl_by_comp_mask(IN osm_sa_t * sa, IN const osm_port_t * const p_port,
+		     osm_slvl_search_ctxt_t * const p_ctxt)
 {
 	const ib_slvl_table_record_t *p_rcvd_rec;
 	ib_net64_t comp_mask;
@@ -153,7 +150,7 @@ __osm_sa_slvl_by_comp_mask(IN osm_sa_t * sa,
 		/* check that the p_out_physp and the p_req_physp share a pkey */
 		if (osm_physp_share_pkey
 		    (sa->p_log, p_req_physp, p_out_physp))
-			__osm_sa_slvl_create(sa, p_out_physp, p_ctxt, 0);
+			sa_slvl_create(sa, p_out_physp, p_ctxt, 0);
 	} else {
 		if (comp_mask & IB_SLVL_COMPMASK_OUT_PORT)
 			out_port_start = out_port_end =
@@ -188,8 +185,8 @@ __osm_sa_slvl_by_comp_mask(IN osm_sa_t * sa,
 				    (sa->p_log, p_req_physp, p_out_physp))
 					continue;
 
-				__osm_sa_slvl_create(sa, p_out_physp, p_ctxt,
-						     in_port_num);
+				sa_slvl_create(sa, p_out_physp, p_ctxt,
+					       in_port_num);
 			}
 		}
 	}
@@ -199,14 +196,13 @@ __osm_sa_slvl_by_comp_mask(IN osm_sa_t * sa,
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_slvl_by_comp_mask_cb(IN cl_map_item_t * const p_map_item,
-			      IN void *context)
+sa_slvl_by_comp_mask_cb(IN cl_map_item_t * const p_map_item, IN void *context)
 {
 	const osm_port_t *const p_port = (osm_port_t *) p_map_item;
 	osm_slvl_search_ctxt_t *const p_ctxt =
 	    (osm_slvl_search_ctxt_t *) context;
 
-	__osm_sa_slvl_by_comp_mask(p_ctxt->sa, p_port, p_ctxt);
+	sa_slvl_by_comp_mask(p_ctxt->sa, p_port, p_ctxt);
 }
 
 /**********************************************************************
@@ -297,11 +293,10 @@ void osm_slvl_rec_rcv_process(IN void *ctx, IN void *data)
 		/* if we have a unique port - no need for a port search */
 		if (p_port)
 			/*  this does the loop on all the port phys ports */
-			__osm_sa_slvl_by_comp_mask(sa, p_port, &context);
+			sa_slvl_by_comp_mask(sa, p_port, &context);
 		else
 			cl_qmap_apply_func(&sa->p_subn->port_guid_tbl,
-					   __osm_sa_slvl_by_comp_mask_cb,
-					   &context);
+					   sa_slvl_by_comp_mask_cb, &context);
 	}
 
 	cl_plock_release(sa->p_lock);
diff --git a/opensm/opensm/osm_sa_sminfo_record.c b/opensm/opensm/osm_sa_sminfo_record.c
index de99065..1898ae7 100644
--- a/opensm/opensm/osm_sa_sminfo_record.c
+++ b/opensm/opensm/osm_sa_sminfo_record.c
@@ -77,13 +77,10 @@ typedef struct osm_smir_search_ctxt {
 } osm_smir_search_ctxt_t;
 
 static ib_api_status_t
-__osm_smir_rcv_new_smir(IN osm_sa_t * sa,
-			IN const osm_port_t * const p_port,
-			IN cl_qlist_t * const p_list,
-			IN ib_net64_t const guid,
-			IN ib_net32_t const act_count,
-			IN uint8_t const pri_state,
-			IN const osm_physp_t * const p_req_physp)
+smir_rcv_new_smir(IN osm_sa_t * sa, IN const osm_port_t * const p_port,
+		  IN cl_qlist_t * const p_list, IN ib_net64_t const guid,
+		  IN ib_net32_t const act_count, IN uint8_t const pri_state,
+		  IN const osm_physp_t * const p_req_physp)
 {
 	osm_smir_item_t *p_rec_item;
 	ib_api_status_t status = IB_SUCCESS;
@@ -118,9 +115,9 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_smir_by_comp_mask(IN osm_sa_t * sa,
-			   IN const osm_remote_sm_t * const p_rem_sm,
-			   osm_smir_search_ctxt_t * const p_ctxt)
+sa_smir_by_comp_mask(IN osm_sa_t * sa,
+		     IN const osm_remote_sm_t * const p_rem_sm,
+		     osm_smir_search_ctxt_t * const p_ctxt)
 {
 	const ib_sminfo_record_t *const p_rcvd_rec = p_ctxt->p_rcvd_rec;
 	const osm_physp_t *const p_req_physp = p_ctxt->p_req_physp;
@@ -147,10 +144,9 @@ __osm_sa_smir_by_comp_mask(IN osm_sa_t * sa,
 
 	/* Implement any other needed search cases */
 
-	__osm_smir_rcv_new_smir(sa, p_rem_sm->p_port, p_ctxt->p_list,
-				p_rem_sm->smi.guid,
-				p_rem_sm->smi.act_count,
-				p_rem_sm->smi.pri_state, p_req_physp);
+	smir_rcv_new_smir(sa, p_rem_sm->p_port, p_ctxt->p_list,
+			  p_rem_sm->smi.guid, p_rem_sm->smi.act_count,
+			  p_rem_sm->smi.pri_state, p_req_physp);
 
 Exit:
 	OSM_LOG_EXIT(sa->p_log);
@@ -159,14 +155,13 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_smir_by_comp_mask_cb(IN cl_map_item_t * const p_map_item,
-			      IN void *context)
+sa_smir_by_comp_mask_cb(IN cl_map_item_t * const p_map_item, IN void *context)
 {
 	const osm_remote_sm_t *const p_rem_sm = (osm_remote_sm_t *) p_map_item;
 	osm_smir_search_ctxt_t *const p_ctxt =
 	    (osm_smir_search_ctxt_t *) context;
 
-	__osm_sa_smir_by_comp_mask(p_ctxt->sa, p_rem_sm, p_ctxt);
+	sa_smir_by_comp_mask(p_ctxt->sa, p_rem_sm, p_ctxt);
 }
 
 /**********************************************************************
@@ -292,10 +287,10 @@ void osm_smir_rcv_process(IN void *ctx, IN void *data)
 			pri_state = sa->p_subn->sm_state & 0x0F;
 			pri_state |=
 			    (sa->p_subn->opt.sm_priority & 0x0F) << 4;
-			__osm_smir_rcv_new_smir(sa, local_port, context.p_list,
-						sa->p_subn->sm_port_guid,
-						cl_ntoh32(sa->p_subn->p_osm->stats.qp0_mads_sent),
-						pri_state, p_req_physp);
+			smir_rcv_new_smir(sa, local_port, context.p_list,
+					  sa->p_subn->sm_port_guid,
+					  cl_ntoh32(sa->p_subn->p_osm->stats.qp0_mads_sent),
+					  pri_state, p_req_physp);
 		}
 
 	      Remotes:
@@ -308,8 +303,7 @@ void osm_smir_rcv_process(IN void *ctx, IN void *data)
 							    port_guid);
 			if (p_rem_sm !=
 			    (osm_remote_sm_t *) cl_qmap_end(p_sm_guid_tbl))
-				__osm_sa_smir_by_comp_mask(sa, p_rem_sm,
-							   &context);
+				sa_smir_by_comp_mask(sa, p_rem_sm, &context);
 			else
 				OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 280A: "
 					"No remote SM for GUID 0x%016" PRIx64
@@ -317,8 +311,7 @@ void osm_smir_rcv_process(IN void *ctx, IN void *data)
 		} else {
 			/* Go over all other known (remote) SMs */
 			cl_qmap_apply_func(&sa->p_subn->sm_guid_tbl,
-					   __osm_sa_smir_by_comp_mask_cb,
-					   &context);
+					   sa_smir_by_comp_mask_cb, &context);
 		}
 	}
 
diff --git a/opensm/opensm/osm_sa_sw_info_record.c b/opensm/opensm/osm_sa_sw_info_record.c
index 649b0ac..96ebb81 100644
--- a/opensm/opensm/osm_sa_sw_info_record.c
+++ b/opensm/opensm/osm_sa_sw_info_record.c
@@ -70,9 +70,8 @@ typedef struct osm_sir_search_ctxt {
 /**********************************************************************
  **********************************************************************/
 static ib_api_status_t
-__osm_sir_rcv_new_sir(IN osm_sa_t * sa,
-		      IN const osm_switch_t * const p_sw,
-		      IN cl_qlist_t * const p_list, IN ib_net16_t const lid)
+sir_rcv_new_sir(IN osm_sa_t * sa, IN const osm_switch_t * const p_sw,
+		IN cl_qlist_t * const p_list, IN ib_net16_t const lid)
 {
 	osm_sir_item_t *p_rec_item;
 	ib_api_status_t status = IB_SUCCESS;
@@ -105,11 +104,9 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sir_rcv_create_sir(IN osm_sa_t * sa,
-			 IN const osm_switch_t * const p_sw,
-			 IN cl_qlist_t * const p_list,
-			 IN ib_net16_t const match_lid,
-			 IN const osm_physp_t * const p_req_physp)
+sir_rcv_create_sir(IN osm_sa_t * sa, IN const osm_switch_t * const p_sw,
+		   IN cl_qlist_t * const p_list, IN ib_net16_t const match_lid,
+		   IN const osm_physp_t * const p_req_physp)
 {
 	osm_port_t *p_port;
 	const osm_physp_t *p_physp;
@@ -163,7 +160,7 @@ __osm_sir_rcv_create_sir(IN osm_sa_t * sa,
 
 	}
 
-	__osm_sir_rcv_new_sir(sa, p_sw, p_list, osm_port_get_base_lid(p_port));
+	sir_rcv_new_sir(sa, p_sw, p_list, osm_port_get_base_lid(p_port));
 
 Exit:
 	OSM_LOG_EXIT(sa->p_log);
@@ -172,8 +169,7 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sir_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item,
-			   IN void *context)
+sir_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item, IN void *context)
 {
 	const osm_sir_search_ctxt_t *const p_ctxt =
 	    (osm_sir_search_ctxt_t *) context;
@@ -195,8 +191,7 @@ __osm_sir_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item,
 			goto Exit;
 	}
 
-	__osm_sir_rcv_create_sir(sa, p_sw, p_ctxt->p_list,
-				 match_lid, p_req_physp);
+	sir_rcv_create_sir(sa, p_sw, p_ctxt->p_list, match_lid, p_req_physp);
 
 Exit:
 	OSM_LOG_EXIT(p_ctxt->sa->p_log);
@@ -261,8 +256,8 @@ void osm_sir_rcv_process(IN void *ctx, IN void *data)
 	cl_plock_acquire(sa->p_lock);
 
 	/* Go over all switches */
-	cl_qmap_apply_func(&sa->p_subn->sw_guid_tbl,
-			   __osm_sir_rcv_by_comp_mask, &context);
+	cl_qmap_apply_func(&sa->p_subn->sw_guid_tbl, sir_rcv_by_comp_mask,
+			   &context);
 
 	cl_plock_release(sa->p_lock);
 
diff --git a/opensm/opensm/osm_sa_vlarb_record.c b/opensm/opensm/osm_sa_vlarb_record.c
index 3bc9b8a..7d20786 100644
--- a/opensm/opensm/osm_sa_vlarb_record.c
+++ b/opensm/opensm/osm_sa_vlarb_record.c
@@ -74,10 +74,9 @@ typedef struct osm_vl_arb_search_ctxt {
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_vl_arb_create(IN osm_sa_t * sa,
-		       IN osm_physp_t * const p_physp,
-		       IN osm_vl_arb_search_ctxt_t * const p_ctxt,
-		       IN uint8_t block)
+sa_vl_arb_create(IN osm_sa_t * sa, IN osm_physp_t * const p_physp,
+		 IN osm_vl_arb_search_ctxt_t * const p_ctxt,
+		 IN uint8_t block)
 {
 	osm_vl_arb_item_t *p_rec_item;
 	uint16_t lid;
@@ -120,9 +119,8 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_vl_arb_check_physp(IN osm_sa_t * sa,
-			    IN osm_physp_t * const p_physp,
-			    osm_vl_arb_search_ctxt_t * const p_ctxt)
+sa_vl_arb_check_physp(IN osm_sa_t * sa, IN osm_physp_t * const p_physp,
+		      osm_vl_arb_search_ctxt_t * const p_ctxt)
 {
 	ib_net64_t comp_mask = p_ctxt->comp_mask;
 	uint8_t block;
@@ -133,7 +131,7 @@ __osm_sa_vl_arb_check_physp(IN osm_sa_t * sa,
 	for (block = 1; block <= 4; block++) {
 		if (!(comp_mask & IB_VLA_COMPMASK_BLOCK)
 		    || block == p_ctxt->block_num) {
-			__osm_sa_vl_arb_create(sa, p_physp, p_ctxt, block);
+			sa_vl_arb_create(sa, p_physp, p_ctxt, block);
 		}
 	}
 
@@ -143,9 +141,8 @@ __osm_sa_vl_arb_check_physp(IN osm_sa_t * sa,
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_vl_arb_by_comp_mask(IN osm_sa_t * sa,
-			     IN const osm_port_t * const p_port,
-			     osm_vl_arb_search_ctxt_t * const p_ctxt)
+sa_vl_arb_by_comp_mask(IN osm_sa_t * sa, IN const osm_port_t * const p_port,
+		       osm_vl_arb_search_ctxt_t * const p_ctxt)
 {
 	const ib_vl_arb_table_record_t *p_rcvd_rec;
 	ib_net64_t comp_mask;
@@ -181,8 +178,7 @@ __osm_sa_vl_arb_by_comp_mask(IN osm_sa_t * sa,
 			if (p_physp &&
 			    osm_physp_share_pkey(sa->p_log, p_req_physp,
 						 p_physp))
-				__osm_sa_vl_arb_check_physp(sa, p_physp,
-							    p_ctxt);
+				sa_vl_arb_check_physp(sa, p_physp, p_ctxt);
 		} else {
 			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2A03: "
 				"Given Physical Port Number: 0x%X is out of range should be < 0x%X\n",
@@ -204,7 +200,7 @@ __osm_sa_vl_arb_by_comp_mask(IN osm_sa_t * sa,
 			    (sa->p_log, p_req_physp, p_physp))
 				continue;
 
-			__osm_sa_vl_arb_check_physp(sa, p_physp, p_ctxt);
+			sa_vl_arb_check_physp(sa, p_physp, p_ctxt);
 		}
 	}
 Exit:
@@ -214,14 +210,14 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sa_vl_arb_by_comp_mask_cb(IN cl_map_item_t * const p_map_item,
-				IN void *context)
+sa_vl_arb_by_comp_mask_cb(IN cl_map_item_t * const p_map_item,
+			  IN void *context)
 {
 	const osm_port_t *const p_port = (osm_port_t *) p_map_item;
 	osm_vl_arb_search_ctxt_t *const p_ctxt =
 	    (osm_vl_arb_search_ctxt_t *) context;
 
-	__osm_sa_vl_arb_by_comp_mask(p_ctxt->sa, p_port, p_ctxt);
+	sa_vl_arb_by_comp_mask(p_ctxt->sa, p_port, p_ctxt);
 }
 
 /**********************************************************************
@@ -314,10 +310,10 @@ void osm_vlarb_rec_rcv_process(IN void *ctx, IN void *data)
 		/* if we got a unique port - no need for a port search */
 		if (p_port)
 			/*  this does the loop on all the port phys ports */
-			__osm_sa_vl_arb_by_comp_mask(sa, p_port, &context);
+			sa_vl_arb_by_comp_mask(sa, p_port, &context);
 		else
 			cl_qmap_apply_func(&sa->p_subn->port_guid_tbl,
-					   __osm_sa_vl_arb_by_comp_mask_cb,
+					   sa_vl_arb_by_comp_mask_cb,
 					   &context);
 	}
 
diff --git a/opensm/opensm/osm_sm.c b/opensm/opensm/osm_sm.c
index 60dcdbb..f17119b 100644
--- a/opensm/opensm/osm_sm.c
+++ b/opensm/opensm/osm_sm.c
@@ -90,7 +90,7 @@ static void osm_sm_process(osm_sm_t * sm, osm_signal_t signal)
 		osm_state_mgr_process(sm, signal);
 }
 
-static void __osm_sm_sweeper(IN void *p_ptr)
+static void sm_sweeper(IN void *p_ptr)
 {
 	ib_api_status_t status;
 	osm_sm_t *const p_sm = (osm_sm_t *) p_ptr;
@@ -390,7 +390,7 @@ osm_sm_init(IN osm_sm_t * const p_sm,
 	 * the sweeper thread if the user wants sweeping.
 	 */
 	p_sm->thread_state = OSM_THREAD_STATE_RUN;
-	status = cl_thread_init(&p_sm->sweeper, __osm_sm_sweeper, p_sm,
+	status = cl_thread_init(&p_sm->sweeper, sm_sweeper, p_sm,
 				"opensm sweeper");
 	if (status != IB_SUCCESS)
 		goto Exit;
@@ -449,8 +449,7 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static ib_api_status_t
-__osm_sm_mgrp_process(IN osm_sm_t * const p_sm,
-		      IN osm_mgrp_t * const p_mgrp)
+sm_mgrp_process(IN osm_sm_t * const p_sm, IN osm_mgrp_t * const p_mgrp)
 {
 	osm_mcast_mgr_ctxt_t *ctx;
 
@@ -553,7 +552,7 @@ osm_sm_mcgrp_join(IN osm_sm_t * const p_sm,
 		goto Exit;
 	}
 
-	status = __osm_sm_mgrp_process(p_sm, p_mgrp);
+	status = sm_mgrp_process(p_sm, p_mgrp);
 	CL_PLOCK_RELEASE(p_sm->p_lock);
 
 Exit:
@@ -609,7 +608,7 @@ osm_sm_mcgrp_leave(IN osm_sm_t * const p_sm,
 	 */
 	osm_port_remove_mgrp(p_port, mlid);
 
-	status = __osm_sm_mgrp_process(p_sm, p_mgrp);
+	status = sm_mgrp_process(p_sm, p_mgrp);
 	CL_PLOCK_RELEASE(p_sm->p_lock);
 
 Exit:
diff --git a/opensm/opensm/osm_sm_mad_ctrl.c b/opensm/opensm/osm_sm_mad_ctrl.c
index 992d712..04b23d7 100644
--- a/opensm/opensm/osm_sm_mad_ctrl.c
+++ b/opensm/opensm/osm_sm_mad_ctrl.c
@@ -55,9 +55,9 @@
 #include <opensm/osm_helper.h>
 #include <opensm/osm_opensm.h>
 
-/****f* opensm: SM/__osm_sm_mad_ctrl_retire_trans_mad
+/****f* opensm: SM/sm_mad_ctrl_retire_trans_mad
  * NAME
- * __osm_sm_mad_ctrl_retire_trans_mad
+ * sm_mad_ctrl_retire_trans_mad
  *
  * DESCRIPTION
  * This function handles clean-up of MADs associated with the SM's
@@ -67,7 +67,7 @@
  */
 
 static void
-__osm_sm_mad_ctrl_retire_trans_mad(IN osm_sm_mad_ctrl_t * const p_ctrl,
+sm_mad_ctrl_retire_trans_mad(IN osm_sm_mad_ctrl_t * const p_ctrl,
 				   IN osm_madw_t * const p_madw)
 {
 	uint32_t outstanding;
@@ -95,9 +95,9 @@ __osm_sm_mad_ctrl_retire_trans_mad(IN osm_sm_mad_ctrl_t * const p_ctrl,
 
 /************/
 
-/****f* opensm: SM/__osm_sm_mad_ctrl_disp_done_callback
+/****f* opensm: SM/sm_mad_ctrl_disp_done_callback
  * NAME
- * __osm_sm_mad_ctrl_disp_done_callback
+ * sm_mad_ctrl_disp_done_callback
  *
  * DESCRIPTION
  * This function is the Dispatcher callback that indicates
@@ -106,7 +106,7 @@ __osm_sm_mad_ctrl_retire_trans_mad(IN osm_sm_mad_ctrl_t * const p_ctrl,
  * SYNOPSIS
  */
 static void
-__osm_sm_mad_ctrl_disp_done_callback(IN void *context, IN void *p_data)
+sm_mad_ctrl_disp_done_callback(IN void *context, IN void *p_data)
 {
 	osm_sm_mad_ctrl_t *const p_ctrl = (osm_sm_mad_ctrl_t *) context;
 	osm_madw_t *const p_madw = (osm_madw_t *) p_data;
@@ -127,9 +127,9 @@ __osm_sm_mad_ctrl_disp_done_callback(IN void *context, IN void *p_data)
 	p_smp = osm_madw_get_smp_ptr(p_madw);
 	if (ib_smp_is_response(p_smp)) {
 		CL_ASSERT(p_madw->resp_expected == FALSE);
-		__osm_sm_mad_ctrl_retire_trans_mad(p_ctrl, p_madw);
+		sm_mad_ctrl_retire_trans_mad(p_ctrl, p_madw);
 	} else if (p_madw->resp_expected == TRUE)
-		__osm_sm_mad_ctrl_retire_trans_mad(p_ctrl, p_madw);
+		sm_mad_ctrl_retire_trans_mad(p_ctrl, p_madw);
 	else
 		osm_mad_pool_put(p_ctrl->p_mad_pool, p_madw);
 
@@ -138,9 +138,9 @@ __osm_sm_mad_ctrl_disp_done_callback(IN void *context, IN void *p_data)
 
 /************/
 
-/****f* opensm: SM/__osm_sm_mad_ctrl_update_wire_stats
+/****f* opensm: SM/sm_mad_ctrl_update_wire_stats
  * NAME
- * __osm_sm_mad_ctrl_update_wire_stats
+ * sm_mad_ctrl_update_wire_stats
  *
  * DESCRIPTION
  * Updates wire stats for outstanding MADs and calls the VL15 poller.
@@ -148,7 +148,7 @@ __osm_sm_mad_ctrl_disp_done_callback(IN void *context, IN void *p_data)
  * SYNOPSIS
  */
 static void
-__osm_sm_mad_ctrl_update_wire_stats(IN osm_sm_mad_ctrl_t * const p_ctrl)
+sm_mad_ctrl_update_wire_stats(IN osm_sm_mad_ctrl_t * const p_ctrl)
 {
 	uint32_t mads_on_wire;
 
@@ -169,9 +169,9 @@ __osm_sm_mad_ctrl_update_wire_stats(IN osm_sm_mad_ctrl_t * const p_ctrl)
 	OSM_LOG_EXIT(p_ctrl->p_log);
 }
 
-/****f* opensm: SM/__osm_sm_mad_ctrl_process_get_resp
+/****f* opensm: SM/sm_mad_ctrl_process_get_resp
  * NAME
- * __osm_sm_mad_ctrl_process_get_resp
+ * sm_mad_ctrl_process_get_resp
  *
  * DESCRIPTION
  * This function handles method GetResp() for received MADs.
@@ -180,7 +180,7 @@ __osm_sm_mad_ctrl_update_wire_stats(IN osm_sm_mad_ctrl_t * const p_ctrl)
  * SYNOPSIS
  */
 static void
-__osm_sm_mad_ctrl_process_get_resp(IN osm_sm_mad_ctrl_t * const p_ctrl,
+sm_mad_ctrl_process_get_resp(IN osm_sm_mad_ctrl_t * const p_ctrl,
 				   IN osm_madw_t * p_madw,
 				   IN void *transaction_context)
 {
@@ -204,7 +204,7 @@ __osm_sm_mad_ctrl_process_get_resp(IN osm_sm_mad_ctrl_t * const p_ctrl,
 
 	p_old_madw = (osm_madw_t *) transaction_context;
 
-	__osm_sm_mad_ctrl_update_wire_stats(p_ctrl);
+	sm_mad_ctrl_update_wire_stats(p_ctrl);
 
 	/*
 	   Copy the MAD Wrapper context from the requesting MAD
@@ -277,7 +277,7 @@ __osm_sm_mad_ctrl_process_get_resp(IN osm_sm_mad_ctrl_t * const p_ctrl,
 		osm_get_disp_msg_str(msg_id));
 
 	status = cl_disp_post(p_ctrl->h_disp, msg_id, p_madw,
-			      __osm_sm_mad_ctrl_disp_done_callback, p_ctrl);
+			      sm_mad_ctrl_disp_done_callback, p_ctrl);
 
 	if (status != CL_SUCCESS) {
 		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3104: "
@@ -290,9 +290,9 @@ Exit:
 	OSM_LOG_EXIT(p_ctrl->p_log);
 }
 
-/****f* opensm: SM/__osm_sm_mad_ctrl_process_get
+/****f* opensm: SM/sm_mad_ctrl_process_get
  * NAME
- * __osm_sm_mad_ctrl_process_get
+ * sm_mad_ctrl_process_get
  *
  * DESCRIPTION
  * This function handles method Get() for received MADs.
@@ -300,8 +300,8 @@ Exit:
  * SYNOPSIS
  */
 static void
-__osm_sm_mad_ctrl_process_get(IN osm_sm_mad_ctrl_t * const p_ctrl,
-			      IN osm_madw_t * p_madw)
+sm_mad_ctrl_process_get(IN osm_sm_mad_ctrl_t * const p_ctrl,
+			IN osm_madw_t * p_madw)
 {
 	ib_smp_t *p_smp;
 	cl_status_t status;
@@ -346,7 +346,7 @@ __osm_sm_mad_ctrl_process_get(IN osm_sm_mad_ctrl_t * const p_ctrl,
 		osm_get_disp_msg_str(msg_id));
 
 	status = cl_disp_post(p_ctrl->h_disp, msg_id, p_madw,
-			      __osm_sm_mad_ctrl_disp_done_callback, p_ctrl);
+			      sm_mad_ctrl_disp_done_callback, p_ctrl);
 
 	if (status != CL_SUCCESS) {
 		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3106: "
@@ -369,9 +369,9 @@ Exit:
  * SEE ALSO
  *********/
 
-/****f* opensm: SM/__osm_sm_mad_ctrl_process_set
+/****f* opensm: SM/sm_mad_ctrl_process_set
  * NAME
- * __osm_sm_mad_ctrl_process_set
+ * sm_mad_ctrl_process_set
  *
  * DESCRIPTION
  * This function handles method Set() for received MADs.
@@ -379,8 +379,8 @@ Exit:
  * SYNOPSIS
  */
 static void
-__osm_sm_mad_ctrl_process_set(IN osm_sm_mad_ctrl_t * const p_ctrl,
-			      IN osm_madw_t * p_madw)
+sm_mad_ctrl_process_set(IN osm_sm_mad_ctrl_t * const p_ctrl,
+			IN osm_madw_t * p_madw)
 {
 	ib_smp_t *p_smp;
 	cl_status_t status;
@@ -426,7 +426,7 @@ __osm_sm_mad_ctrl_process_set(IN osm_sm_mad_ctrl_t * const p_ctrl,
 		osm_get_disp_msg_str(msg_id));
 
 	status = cl_disp_post(p_ctrl->h_disp, msg_id, p_madw,
-			      __osm_sm_mad_ctrl_disp_done_callback, p_ctrl);
+			      sm_mad_ctrl_disp_done_callback, p_ctrl);
 
 	if (status != CL_SUCCESS) {
 		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3108: "
@@ -449,9 +449,9 @@ Exit:
  * SEE ALSO
  *********/
 
-/****f* opensm: SM/__osm_sm_mad_ctrl_process_trap
+/****f* opensm: SM/sm_mad_ctrl_process_trap
  * NAME
- * __osm_sm_mad_ctrl_process_trap
+ * sm_mad_ctrl_process_trap
  *
  * DESCRIPTION
  * This function handles method Trap() for received MADs.
@@ -459,8 +459,8 @@ Exit:
  * SYNOPSIS
  */
 static void
-__osm_sm_mad_ctrl_process_trap(IN osm_sm_mad_ctrl_t * const p_ctrl,
-			       IN osm_madw_t * p_madw)
+sm_mad_ctrl_process_trap(IN osm_sm_mad_ctrl_t * const p_ctrl,
+			 IN osm_madw_t * p_madw)
 {
 	ib_smp_t *p_smp;
 	cl_status_t status;
@@ -515,7 +515,7 @@ __osm_sm_mad_ctrl_process_trap(IN osm_sm_mad_ctrl_t * const p_ctrl,
 		osm_get_disp_msg_str(msg_id));
 
 	status = cl_disp_post(p_ctrl->h_disp, msg_id, p_madw,
-			      __osm_sm_mad_ctrl_disp_done_callback, p_ctrl);
+			      sm_mad_ctrl_disp_done_callback, p_ctrl);
 
 	if (status != CL_SUCCESS) {
 		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3110: "
@@ -538,9 +538,9 @@ Exit:
  * SEE ALSO
  *********/
 
-/****f* opensm: SM/__osm_sm_mad_ctrl_process_trap_repress
+/****f* opensm: SM/sm_mad_ctrl_process_trap_repress
  * NAME
- * __osm_sm_mad_ctrl_process_trap_repress
+ * sm_mad_ctrl_process_trap_repress
  *
  * DESCRIPTION
  * This function handles method TrapRepress() for received MADs.
@@ -548,8 +548,8 @@ Exit:
  * SYNOPSIS
  */
 static void
-__osm_sm_mad_ctrl_process_trap_repress(IN osm_sm_mad_ctrl_t * const p_ctrl,
-				       IN osm_madw_t * p_madw)
+sm_mad_ctrl_process_trap_repress(IN osm_sm_mad_ctrl_t * const p_ctrl,
+				 IN osm_madw_t * p_madw)
 {
 	ib_smp_t *p_smp;
 
@@ -589,9 +589,9 @@ __osm_sm_mad_ctrl_process_trap_repress(IN osm_sm_mad_ctrl_t * const p_ctrl,
  * SEE ALSO
  *********/
 
-/****f* opensm: SM/__osm_sm_mad_ctrl_rcv_callback
+/****f* opensm: SM/sm_mad_ctrl_rcv_callback
  * NAME
- * __osm_sm_mad_ctrl_rcv_callback
+ * sm_mad_ctrl_rcv_callback
  *
  * DESCRIPTION
  * This is the callback from the transport layer for received MADs.
@@ -599,9 +599,8 @@ __osm_sm_mad_ctrl_process_trap_repress(IN osm_sm_mad_ctrl_t * const p_ctrl,
  * SYNOPSIS
  */
 static void
-__osm_sm_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw,
-			       IN void *bind_context,
-			       IN osm_madw_t * p_req_madw)
+sm_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw, IN void *bind_context,
+			 IN osm_madw_t * p_req_madw)
 {
 	osm_sm_mad_ctrl_t *p_ctrl = (osm_sm_mad_ctrl_t *) bind_context;
 	ib_smp_t *p_smp;
@@ -631,9 +630,9 @@ __osm_sm_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw,
 		/* retire the mad or put it back */
 		if (ib_smp_is_response(p_smp)) {
 			CL_ASSERT(p_madw->resp_expected == FALSE);
-			__osm_sm_mad_ctrl_retire_trans_mad(p_ctrl, p_madw);
+			sm_mad_ctrl_retire_trans_mad(p_ctrl, p_madw);
 		} else if (p_madw->resp_expected == TRUE)
-			__osm_sm_mad_ctrl_retire_trans_mad(p_ctrl, p_madw);
+			sm_mad_ctrl_retire_trans_mad(p_ctrl, p_madw);
 		else
 			osm_mad_pool_put(p_ctrl->p_mad_pool, p_madw);
 
@@ -657,27 +656,27 @@ __osm_sm_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw,
 	switch (p_smp->method) {
 	case IB_MAD_METHOD_GET_RESP:
 		CL_ASSERT(p_req_madw != NULL);
-		__osm_sm_mad_ctrl_process_get_resp(p_ctrl, p_madw, p_req_madw);
+		sm_mad_ctrl_process_get_resp(p_ctrl, p_madw, p_req_madw);
 		break;
 
 	case IB_MAD_METHOD_GET:
 		CL_ASSERT(p_req_madw == NULL);
-		__osm_sm_mad_ctrl_process_get(p_ctrl, p_madw);
+		sm_mad_ctrl_process_get(p_ctrl, p_madw);
 		break;
 
 	case IB_MAD_METHOD_TRAP:
 		CL_ASSERT(p_req_madw == NULL);
-		__osm_sm_mad_ctrl_process_trap(p_ctrl, p_madw);
+		sm_mad_ctrl_process_trap(p_ctrl, p_madw);
 		break;
 
 	case IB_MAD_METHOD_SET:
 		CL_ASSERT(p_req_madw == NULL);
-		__osm_sm_mad_ctrl_process_set(p_ctrl, p_madw);
+		sm_mad_ctrl_process_set(p_ctrl, p_madw);
 		break;
 
 	case IB_MAD_METHOD_TRAP_REPRESS:
 		CL_ASSERT(p_req_madw != NULL);
-		__osm_sm_mad_ctrl_process_trap_repress(p_ctrl, p_madw);
+		sm_mad_ctrl_process_trap_repress(p_ctrl, p_madw);
 		break;
 
 	case IB_MAD_METHOD_SEND:
@@ -706,9 +705,9 @@ Exit:
  * SEE ALSO
  *********/
 
-/****f* opensm: SM/__osm_sm_mad_ctrl_send_err_cb
+/****f* opensm: SM/sm_mad_ctrl_send_err_cb
  * NAME
- * __osm_sm_mad_ctrl_send_err_cb
+ * sm_mad_ctrl_send_err_cb
  *
  * DESCRIPTION
  * This is the callback from the transport layer for send errors
@@ -717,7 +716,7 @@ Exit:
  * SYNOPSIS
  */
 static void
-__osm_sm_mad_ctrl_send_err_cb(IN void *bind_context, IN osm_madw_t * p_madw)
+sm_mad_ctrl_send_err_cb(IN void *bind_context, IN osm_madw_t * p_madw)
 {
 	osm_sm_mad_ctrl_t *p_ctrl = (osm_sm_mad_ctrl_t *) bind_context;
 	ib_api_status_t status;
@@ -782,7 +781,7 @@ __osm_sm_mad_ctrl_send_err_cb(IN void *bind_context, IN osm_madw_t * p_madw)
 	osm_dump_dr_smp(p_ctrl->p_log, osm_madw_get_smp_ptr(p_madw),
 			OSM_LOG_ERROR);
 
-	__osm_sm_mad_ctrl_update_wire_stats(p_ctrl);
+	sm_mad_ctrl_update_wire_stats(p_ctrl);
 
 	if (osm_madw_get_err_msg(p_madw) != CL_DISP_MSGID_NONE) {
 		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
@@ -790,10 +789,8 @@ __osm_sm_mad_ctrl_send_err_cb(IN void *bind_context, IN osm_madw_t * p_madw)
 			osm_get_disp_msg_str(osm_madw_get_err_msg(p_madw)));
 
 		status = cl_disp_post(p_ctrl->h_disp,
-				      osm_madw_get_err_msg(p_madw),
-				      p_madw,
-				      __osm_sm_mad_ctrl_disp_done_callback,
-				      p_ctrl);
+				      osm_madw_get_err_msg(p_madw), p_madw,
+				      sm_mad_ctrl_disp_done_callback, p_ctrl);
 		if (status != CL_SUCCESS)
 			OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3115: "
 				"Dispatcher post message failed (%s)\n",
@@ -802,7 +799,7 @@ __osm_sm_mad_ctrl_send_err_cb(IN void *bind_context, IN osm_madw_t * p_madw)
 		/*
 		   No error message was provided, just retire the MAD.
 		 */
-		__osm_sm_mad_ctrl_retire_trans_mad(p_ctrl, p_madw);
+		sm_mad_ctrl_retire_trans_mad(p_ctrl, p_madw);
 
 	OSM_LOG_EXIT(p_ctrl->p_log);
 }
@@ -910,11 +907,10 @@ osm_sm_mad_ctrl_bind(IN osm_sm_mad_ctrl_t * const p_ctrl,
 	OSM_LOG(p_ctrl->p_log, OSM_LOG_VERBOSE,
 		"Binding to port 0x%" PRIx64 "\n", cl_ntoh64(port_guid));
 
-	p_ctrl->h_bind = osm_vendor_bind(p_ctrl->p_vendor,
-					 &bind_info,
+	p_ctrl->h_bind = osm_vendor_bind(p_ctrl->p_vendor, &bind_info,
 					 p_ctrl->p_mad_pool,
-					 __osm_sm_mad_ctrl_rcv_callback,
-					 __osm_sm_mad_ctrl_send_err_cb, p_ctrl);
+					 sm_mad_ctrl_rcv_callback,
+					 sm_mad_ctrl_send_err_cb, p_ctrl);
 
 	if (p_ctrl->h_bind == OSM_BIND_INVALID_HANDLE) {
 		status = IB_ERROR;
diff --git a/opensm/opensm/osm_sm_state_mgr.c b/opensm/opensm/osm_sm_state_mgr.c
index 343a9e3..87af1ea 100644
--- a/opensm/opensm/osm_sm_state_mgr.c
+++ b/opensm/opensm/osm_sm_state_mgr.c
@@ -75,7 +75,7 @@ void osm_report_sm_state(osm_sm_t * sm)
 
 /**********************************************************************
  **********************************************************************/
-static void __osm_sm_state_mgr_send_master_sm_info_req(osm_sm_t * sm)
+static void sm_state_mgr_send_master_sm_info_req(osm_sm_t * sm)
 {
 	osm_madw_context_t context;
 	const osm_port_t *p_port;
@@ -124,7 +124,7 @@ Exit:
 
 /**********************************************************************
  **********************************************************************/
-static void __osm_sm_state_mgr_start_polling(osm_sm_t * sm)
+static void sm_state_mgr_start_polling(osm_sm_t * sm)
 {
 	uint32_t timeout = sm->p_subn->opt.sminfo_polling_timeout;
 	cl_status_t cl_status;
@@ -139,7 +139,7 @@ static void __osm_sm_state_mgr_start_polling(osm_sm_t * sm)
 	/*
 	 * Send a SubnGet(SMInfo) query to the current (or new) master found.
 	 */
-	__osm_sm_state_mgr_send_master_sm_info_req(sm);
+	sm_state_mgr_send_master_sm_info_req(sm);
 
 	/*
 	 * Start a timer that will wake up every sminfo_polling_timeout milliseconds.
@@ -207,7 +207,7 @@ void osm_sm_state_mgr_polling_callback(IN void *context)
 	}
 
 	/* Send a SubnGet(SMInfo) request to the remote sm (depends on our state) */
-	__osm_sm_state_mgr_send_master_sm_info_req(sm);
+	sm_state_mgr_send_master_sm_info_req(sm);
 
 	/* restart the timer */
 	cl_status = cl_timer_start(&sm->polling_timer, timeout);
@@ -222,8 +222,8 @@ Exit:
 
 /**********************************************************************
  **********************************************************************/
-static void __osm_sm_state_mgr_signal_error(osm_sm_t * sm,
-					    IN const osm_sm_signal_t signal)
+static void sm_state_mgr_signal_error(osm_sm_t * sm,
+				      IN const osm_sm_signal_t signal)
 {
 	OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3207: "
 		"Invalid signal %s in state %s\n",
@@ -293,7 +293,7 @@ ib_api_status_t osm_sm_state_mgr_process(osm_sm_t * sm,
 			 */
 			sm->p_subn->ignore_existing_lfts = FALSE;
 
-			__osm_sm_state_mgr_start_polling(sm);
+			sm_state_mgr_start_polling(sm);
 			break;
 		case OSM_SM_SIGNAL_HANDOVER:
 			/*
@@ -304,7 +304,7 @@ ib_api_status_t osm_sm_state_mgr_process(osm_sm_t * sm,
 			 */
 			break;
 		default:
-			__osm_sm_state_mgr_signal_error(sm, signal);
+			sm_state_mgr_signal_error(sm, signal);
 			status = IB_INVALID_PARAMETER;
 			break;
 		}
@@ -361,7 +361,7 @@ ib_api_status_t osm_sm_state_mgr_process(osm_sm_t * sm,
 			 */
 			break;
 		default:
-			__osm_sm_state_mgr_signal_error(sm, signal);
+			sm_state_mgr_signal_error(sm, signal);
 			status = IB_INVALID_PARAMETER;
 			break;
 		}
@@ -376,10 +376,10 @@ ib_api_status_t osm_sm_state_mgr_process(osm_sm_t * sm,
 			 */
 			sm->p_subn->sm_state = IB_SMINFO_STATE_STANDBY;
 			osm_report_sm_state(sm);
-			__osm_sm_state_mgr_start_polling(sm);
+			sm_state_mgr_start_polling(sm);
 			break;
 		default:
-			__osm_sm_state_mgr_signal_error(sm, signal);
+			sm_state_mgr_signal_error(sm, signal);
 			status = IB_INVALID_PARAMETER;
 			break;
 		}
@@ -422,7 +422,7 @@ ib_api_status_t osm_sm_state_mgr_process(osm_sm_t * sm,
 			 */
 			sm->p_subn->sm_state = IB_SMINFO_STATE_STANDBY;
 			osm_report_sm_state(sm);
-			__osm_sm_state_mgr_start_polling(sm);
+			sm_state_mgr_start_polling(sm);
 			break;
 		case OSM_SM_SIGNAL_WAIT_FOR_HANDOVER:
 			/*
@@ -432,14 +432,14 @@ ib_api_status_t osm_sm_state_mgr_process(osm_sm_t * sm,
 			 * we should move back to discovering, since something must
 			 * have happened to it.
 			 */
-			__osm_sm_state_mgr_start_polling(sm);
+			sm_state_mgr_start_polling(sm);
 			break;
 		case OSM_SM_SIGNAL_DISCOVER:
 			sm->p_subn->sm_state = IB_SMINFO_STATE_DISCOVERING;
 			osm_report_sm_state(sm);
 			break;
 		default:
-			__osm_sm_state_mgr_signal_error(sm, signal);
+			sm_state_mgr_signal_error(sm, signal);
 			status = IB_INVALID_PARAMETER;
 			break;
 		}
@@ -489,7 +489,7 @@ ib_api_status_t osm_sm_state_mgr_check_legality(osm_sm_t * sm,
 			status = IB_SUCCESS;
 			break;
 		default:
-			__osm_sm_state_mgr_signal_error(sm, signal);
+			sm_state_mgr_signal_error(sm, signal);
 			status = IB_INVALID_PARAMETER;
 			break;
 		}
@@ -505,7 +505,7 @@ ib_api_status_t osm_sm_state_mgr_check_legality(osm_sm_t * sm,
 			status = IB_SUCCESS;
 			break;
 		default:
-			__osm_sm_state_mgr_signal_error(sm, signal);
+			sm_state_mgr_signal_error(sm, signal);
 			status = IB_INVALID_PARAMETER;
 			break;
 		}
@@ -517,7 +517,7 @@ ib_api_status_t osm_sm_state_mgr_check_legality(osm_sm_t * sm,
 			status = IB_SUCCESS;
 			break;
 		default:
-			__osm_sm_state_mgr_signal_error(sm, signal);
+			sm_state_mgr_signal_error(sm, signal);
 			status = IB_INVALID_PARAMETER;
 			break;
 		}
@@ -530,7 +530,7 @@ ib_api_status_t osm_sm_state_mgr_check_legality(osm_sm_t * sm,
 			status = IB_SUCCESS;
 			break;
 		default:
-			__osm_sm_state_mgr_signal_error(sm, signal);
+			sm_state_mgr_signal_error(sm, signal);
 			status = IB_INVALID_PARAMETER;
 			break;
 		}
diff --git a/opensm/opensm/osm_sminfo_rcv.c b/opensm/opensm/osm_sminfo_rcv.c
index 429a891..d3062e0 100644
--- a/opensm/opensm/osm_sminfo_rcv.c
+++ b/opensm/opensm/osm_sminfo_rcv.c
@@ -65,8 +65,8 @@
  and lower GUID.
 **********************************************************************/
 static inline boolean_t
-__osm_sminfo_rcv_remote_sm_is_higher(IN osm_sm_t * sm,
-				     IN const ib_sm_info_t * p_remote_smi)
+sminfo_rcv_remote_sm_is_higher(IN osm_sm_t * sm,
+			       IN const ib_sm_info_t * p_remote_smi)
 {
 	return (osm_sm_is_greater_than(ib_sminfo_get_priority(p_remote_smi),
 				       p_remote_smi->guid,
@@ -78,8 +78,8 @@ __osm_sminfo_rcv_remote_sm_is_higher(IN osm_sm_t * sm,
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sminfo_rcv_process_get_request(IN osm_sm_t * sm,
-				     IN const osm_madw_t * const p_madw)
+sminfo_rcv_process_get_request(IN osm_sm_t * sm,
+			       IN const osm_madw_t * const p_madw)
 {
 	uint8_t payload[IB_SMP_DATA_SIZE];
 	ib_smp_t *p_smp;
@@ -141,7 +141,7 @@ Exit:
  *   Check that the SM_Key matches.
  **********************************************************************/
 static ib_api_status_t
-__osm_sminfo_rcv_check_set_req_legality(IN const ib_smp_t * const p_smp)
+sminfo_rcv_check_set_req_legality(IN const ib_smp_t * const p_smp)
 {
 	ib_sm_info_t *p_smi;
 
@@ -164,8 +164,8 @@ __osm_sminfo_rcv_check_set_req_legality(IN const ib_smp_t * const p_smp)
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sminfo_rcv_process_set_request(IN osm_sm_t * sm,
-				     IN const osm_madw_t * const p_madw)
+sminfo_rcv_process_set_request(IN osm_sm_t * sm,
+			       IN const osm_madw_t * const p_madw)
 {
 	uint8_t payload[IB_SMP_DATA_SIZE];
 	ib_smp_t *p_smp;
@@ -213,7 +213,7 @@ __osm_sminfo_rcv_process_set_request(IN osm_sm_t * sm,
 	}
 
 	/* Check the legality of the packet */
-	status = __osm_sminfo_rcv_check_set_req_legality(p_smp);
+	status = sminfo_rcv_check_set_req_legality(p_smp);
 	if (status != IB_SUCCESS) {
 		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F04: "
 			"Check legality failed. AttributeModifier:0x%X RemoteState:%s\n",
@@ -306,9 +306,9 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static osm_signal_t
-__osm_sminfo_rcv_process_get_sm(IN osm_sm_t * sm,
-				IN const osm_remote_sm_t * const p_sm,
-				boolean_t light_sweep)
+sminfo_rcv_process_get_sm(IN osm_sm_t * sm,
+			  IN const osm_remote_sm_t * const p_sm,
+			  boolean_t light_sweep)
 {
 	const ib_sm_info_t *p_smi;
 
@@ -339,8 +339,7 @@ __osm_sminfo_rcv_process_get_sm(IN osm_sm_t * sm,
 			break;
 		case IB_SMINFO_STATE_DISCOVERING:
 		case IB_SMINFO_STATE_STANDBY:
-			if (__osm_sminfo_rcv_remote_sm_is_higher(sm, p_smi)
-			    == TRUE) {
+			if (sminfo_rcv_remote_sm_is_higher(sm, p_smi) == TRUE) {
 				/* the remote is a higher sm - need to stop sweeping */
 				sm->master_sm_found = 1;
 				/* save on the sm the guid of the higher SM we found - */
@@ -366,8 +365,7 @@ __osm_sminfo_rcv_process_get_sm(IN osm_sm_t * sm,
 			/* Signal that to the SM state mgr */
 			osm_sm_state_mgr_signal_master_is_alive(sm);
 
-			if (__osm_sminfo_rcv_remote_sm_is_higher(sm, p_smi) ==
-			    FALSE)
+			if (sminfo_rcv_remote_sm_is_higher(sm, p_smi) == FALSE)
 				osm_send_trap144(sm,
 						 TRAP_144_MASK_SM_PRIORITY_CHANGE);
 			break;
@@ -379,8 +377,8 @@ __osm_sminfo_rcv_process_get_sm(IN osm_sm_t * sm,
 				   If we started polling it when it was master, and it moved
 				   to standby - then it might be with a lower priority than
 				   us - and then we don't want to continue polling it. */
-				if (__osm_sminfo_rcv_remote_sm_is_higher
-				    (sm, p_smi) == TRUE)
+				if (sminfo_rcv_remote_sm_is_higher(sm, p_smi)
+				    == TRUE)
 					osm_sm_state_mgr_signal_master_is_alive(sm);
 			}
 			break;
@@ -406,7 +404,7 @@ __osm_sminfo_rcv_process_get_sm(IN osm_sm_t * sm,
 			break;
 		case IB_SMINFO_STATE_STANDBY:
 			if (light_sweep &&
-			    __osm_sminfo_rcv_remote_sm_is_higher(sm, p_smi))
+			    sminfo_rcv_remote_sm_is_higher(sm, p_smi))
 				sm->p_subn->force_heavy_sweep = TRUE;
 			break;
 		default:
@@ -426,8 +424,8 @@ __osm_sminfo_rcv_process_get_sm(IN osm_sm_t * sm,
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sminfo_rcv_process_get_response(IN osm_sm_t * sm,
-				      IN const osm_madw_t * const p_madw)
+sminfo_rcv_process_get_response(IN osm_sm_t * sm,
+				IN const osm_madw_t * const p_madw)
 {
 	const ib_smp_t *p_smp;
 	const ib_sm_info_t *p_smi;
@@ -508,8 +506,8 @@ __osm_sminfo_rcv_process_get_response(IN osm_sm_t * sm,
 		/* We already know this SM. Update the SMInfo attribute. */
 		p_sm->smi = *p_smi;
 
-	__osm_sminfo_rcv_process_get_sm(sm, p_sm,
-					osm_madw_get_smi_context_ptr(p_madw)->light_sweep);
+	sminfo_rcv_process_get_sm(sm, p_sm,
+				  osm_madw_get_smi_context_ptr(p_madw)->light_sweep);
 
 _unlock_and_exit:
 	CL_PLOCK_RELEASE(sm->p_lock);
@@ -521,8 +519,8 @@ Exit:
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_sminfo_rcv_process_set_response(IN osm_sm_t * sm,
-				      IN const osm_madw_t * const p_madw)
+sminfo_rcv_process_set_response(IN osm_sm_t * sm,
+				IN const osm_madw_t * const p_madw)
 {
 	const ib_smp_t *p_smp;
 	const ib_sm_info_t *p_smi;
@@ -593,16 +591,16 @@ void osm_sminfo_rcv_process(IN void *context, IN void *data)
 
 		if (p_smi_context->set_method == FALSE)
 			/* this is a response to a Get method */
-			__osm_sminfo_rcv_process_get_response(sm, p_madw);
+			sminfo_rcv_process_get_response(sm, p_madw);
 		else
 			/* this is a response to a Set method */
-			__osm_sminfo_rcv_process_set_response(sm, p_madw);
+			sminfo_rcv_process_set_response(sm, p_madw);
 	} else if (p_smp->method == IB_MAD_METHOD_GET)
 		/* This is a SubnGet request */
-		__osm_sminfo_rcv_process_get_request(sm, p_madw);
+		sminfo_rcv_process_get_request(sm, p_madw);
 	else
 		/* This should be a SubnSet request */
-		__osm_sminfo_rcv_process_set_request(sm, p_madw);
+		sminfo_rcv_process_set_request(sm, p_madw);
 
 Exit:
 	OSM_LOG_EXIT(sm->p_log);
diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c
index fe516a6..21ec1f2 100644
--- a/opensm/opensm/osm_state_mgr.c
+++ b/opensm/opensm/osm_state_mgr.c
@@ -72,7 +72,7 @@ extern osm_signal_t osm_link_mgr_process(IN osm_sm_t * sm, IN uint8_t state);
 
 /**********************************************************************
  **********************************************************************/
-static void __osm_state_mgr_up_msg(IN const osm_sm_t * sm)
+static void state_mgr_up_msg(IN const osm_sm_t * sm)
 {
 	/*
 	 * This message should be written only once - when the
@@ -89,8 +89,8 @@ static void __osm_state_mgr_up_msg(IN const osm_sm_t * sm)
 
 /**********************************************************************
  **********************************************************************/
-static void __osm_state_mgr_reset_node_count(IN cl_map_item_t *
-					     const p_map_item, IN void *context)
+static void state_mgr_reset_node_count(IN cl_map_item_t * const p_map_item,
+				       IN void *context)
 {
 	osm_node_t *p_node = (osm_node_t *) p_map_item;
 
@@ -99,8 +99,8 @@ static void __osm_state_mgr_reset_node_count(IN cl_map_item_t *
 
 /**********************************************************************
  **********************************************************************/
-static void __osm_state_mgr_reset_port_count(IN cl_map_item_t *
-					     const p_map_item, IN void *context)
+static void state_mgr_reset_port_count(IN cl_map_item_t * const p_map_item,
+				       IN void *context)
 {
 	osm_port_t *p_port = (osm_port_t *) p_map_item;
 
@@ -110,8 +110,8 @@ static void __osm_state_mgr_reset_port_count(IN cl_map_item_t *
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_state_mgr_reset_switch_count(IN cl_map_item_t * const p_map_item,
-				   IN void *context)
+state_mgr_reset_switch_count(IN cl_map_item_t * const p_map_item,
+			     IN void *context)
 {
 	osm_switch_t *p_sw = (osm_switch_t *) p_map_item;
 
@@ -120,8 +120,8 @@ __osm_state_mgr_reset_switch_count(IN cl_map_item_t * const p_map_item,
 
 /**********************************************************************
  **********************************************************************/
-static void __osm_state_mgr_get_sw_info(IN cl_map_item_t * const p_object,
-					IN void *context)
+static void state_mgr_get_sw_info(IN cl_map_item_t * const p_object,
+				  IN void *context)
 {
 	osm_node_t *p_node;
 	osm_dr_path_t *p_dr_path;
@@ -155,8 +155,8 @@ static void __osm_state_mgr_get_sw_info(IN cl_map_item_t * const p_object,
  Initiate a remote port info request for the given physical port
  **********************************************************************/
 static void
-__osm_state_mgr_get_remote_port_info(IN osm_sm_t * sm,
-				     IN osm_physp_t * const p_physp)
+state_mgr_get_remote_port_info(IN osm_sm_t * sm,
+			       IN osm_physp_t * const p_physp)
 {
 	osm_dr_path_t *p_dr_path;
 	osm_dr_path_t rem_node_dr_path;
@@ -196,7 +196,7 @@ __osm_state_mgr_get_remote_port_info(IN osm_sm_t * sm,
  Initiates a thorough sweep of the subnet.
  Used when there is suspicion that something on the subnet has changed.
 **********************************************************************/
-static ib_api_status_t __osm_state_mgr_sweep_hop_0(IN osm_sm_t * sm)
+static ib_api_status_t state_mgr_sweep_hop_0(IN osm_sm_t * sm)
 {
 	ib_api_status_t status;
 	osm_dr_path_t dr_path;
@@ -221,13 +221,13 @@ static ib_api_status_t __osm_state_mgr_sweep_hop_0(IN osm_sm_t * sm)
 		CL_PLOCK_ACQUIRE(sm->p_lock);
 
 		cl_qmap_apply_func(&sm->p_subn->node_guid_tbl,
-				   __osm_state_mgr_reset_node_count, sm);
+				   state_mgr_reset_node_count, sm);
 
 		cl_qmap_apply_func(&sm->p_subn->port_guid_tbl,
-				   __osm_state_mgr_reset_port_count, sm);
+				   state_mgr_reset_port_count, sm);
 
 		cl_qmap_apply_func(&sm->p_subn->sw_guid_tbl,
-				   __osm_state_mgr_reset_switch_count, sm);
+				   state_mgr_reset_switch_count, sm);
 
 		/* Set the in_sweep_hop_0 flag in subn to be TRUE.
 		 * This will indicate the sweeping not to continue beyond the
@@ -259,7 +259,7 @@ static ib_api_status_t __osm_state_mgr_sweep_hop_0(IN osm_sm_t * sm)
 /**********************************************************************
  Clear out all existing port lid assignments
 **********************************************************************/
-static ib_api_status_t __osm_state_mgr_clean_known_lids(IN osm_sm_t * sm)
+static ib_api_status_t state_mgr_clean_known_lids(IN osm_sm_t * sm)
 {
 	ib_api_status_t status = IB_SUCCESS;
 	cl_ptr_vector_t *p_vec = &(sm->p_subn->port_lid_tbl);
@@ -283,7 +283,7 @@ static ib_api_status_t __osm_state_mgr_clean_known_lids(IN osm_sm_t * sm)
  Notifies the transport layer that the local LID has changed,
  which give it a chance to update address vectors, etc..
 **********************************************************************/
-static ib_api_status_t __osm_state_mgr_notify_lid_change(IN osm_sm_t * sm)
+static ib_api_status_t state_mgr_notify_lid_change(IN osm_sm_t * sm)
 {
 	ib_api_status_t status;
 	osm_bind_handle_t h_bind;
@@ -319,7 +319,7 @@ Exit:
  Returns true if the SM port is down.
  The SM's port object must exist in the port_guid table.
 **********************************************************************/
-static boolean_t __osm_state_mgr_is_sm_port_down(IN osm_sm_t * sm)
+static boolean_t state_mgr_is_sm_port_down(IN osm_sm_t * sm)
 {
 	ib_net64_t port_guid;
 	osm_port_t *p_port;
@@ -370,7 +370,7 @@ Exit:
  This sets off a "chain reaction" that causes discovery of the subnet.
  Used when there is suspicion that something on the subnet has changed.
 **********************************************************************/
-static ib_api_status_t __osm_state_mgr_sweep_hop_1(IN osm_sm_t * sm)
+static ib_api_status_t state_mgr_sweep_hop_1(IN osm_sm_t * sm)
 {
 	ib_api_status_t status = IB_SUCCESS;
 	osm_bind_handle_t h_bind;
@@ -516,8 +516,8 @@ static void query_sm_info(cl_map_item_t *item, void *cxt)
  During a light sweep, check each node to see if the node description
  is valid and if not issue a ND query.
 **********************************************************************/
-static void __osm_state_mgr_get_node_desc(IN cl_map_item_t * const p_object,
-					  IN void *context)
+static void state_mgr_get_node_desc(IN cl_map_item_t * const p_object,
+				    IN void *context)
 {
 	osm_madw_context_t mad_context;
 	osm_node_t *const p_node = (osm_node_t *) p_object;
@@ -569,7 +569,7 @@ exit:
  Initiates a lightweight sweep of the subnet.
  Used during normal sweeps after the subnet is up.
 **********************************************************************/
-static ib_api_status_t __osm_state_mgr_light_sweep_start(IN osm_sm_t * sm)
+static ib_api_status_t state_mgr_light_sweep_start(IN osm_sm_t * sm)
 {
 	ib_api_status_t status = IB_SUCCESS;
 	osm_bind_handle_t h_bind;
@@ -596,11 +596,11 @@ static ib_api_status_t __osm_state_mgr_light_sweep_start(IN osm_sm_t * sm)
 
 	OSM_LOG_MSG_BOX(sm->p_log, OSM_LOG_VERBOSE, "INITIATING LIGHT SWEEP");
 	CL_PLOCK_ACQUIRE(sm->p_lock);
-	cl_qmap_apply_func(p_sw_tbl, __osm_state_mgr_get_sw_info, sm);
+	cl_qmap_apply_func(p_sw_tbl, state_mgr_get_sw_info, sm);
 	CL_PLOCK_RELEASE(sm->p_lock);
 
 	CL_PLOCK_ACQUIRE(sm->p_lock);
-	cl_qmap_apply_func(&sm->p_subn->node_guid_tbl, __osm_state_mgr_get_node_desc, sm);
+	cl_qmap_apply_func(&sm->p_subn->node_guid_tbl, state_mgr_get_node_desc, sm);
 	CL_PLOCK_RELEASE(sm->p_lock);
 
 	/* now scan the list of physical ports that were not down but have no remote port */
@@ -628,8 +628,7 @@ static ib_api_status_t __osm_state_mgr_light_sweep_start(IN osm_sm_t * sm)
 						 osm_physp_get_dr_path_ptr
 						 (p_physp), OSM_LOG_ERROR);
 
-				__osm_state_mgr_get_remote_port_info(sm,
-								     p_physp);
+				state_mgr_get_remote_port_info(sm, p_physp);
 			}
 		}
 	}
@@ -649,7 +648,7 @@ _exit:
  * If there is a remote master SM - return a pointer to it,
  * else - return NULL.
  **********************************************************************/
-static osm_remote_sm_t *__osm_state_mgr_exists_other_master_sm(IN osm_sm_t * sm)
+static osm_remote_sm_t *state_mgr_exists_other_master_sm(IN osm_sm_t * sm)
 {
 	cl_qmap_t *p_sm_tbl;
 	osm_remote_sm_t *p_sm;
@@ -686,7 +685,7 @@ Exit:
  * Compare this SM to the local SM. If the local SM is higher -
  * return NULL, if the remote SM is higher - return a pointer to it.
  **********************************************************************/
-static osm_remote_sm_t *__osm_state_mgr_get_highest_sm(IN osm_sm_t * sm)
+static osm_remote_sm_t *state_mgr_get_highest_sm(IN osm_sm_t * sm)
 {
 	cl_qmap_t *p_sm_tbl;
 	osm_remote_sm_t *p_sm = NULL;
@@ -741,8 +740,8 @@ static osm_remote_sm_t *__osm_state_mgr_get_highest_sm(IN osm_sm_t * sm)
  * remote_sm indicated.
  **********************************************************************/
 static void
-__osm_state_mgr_send_handover(IN osm_sm_t * const sm,
-			      IN osm_remote_sm_t * const p_sm)
+state_mgr_send_handover(IN osm_sm_t * const sm,
+			IN osm_remote_sm_t * const p_sm)
 {
 	uint8_t payload[IB_SMP_DATA_SIZE];
 	ib_sm_info_t *p_smi = (ib_sm_info_t *) payload;
@@ -811,7 +810,7 @@ Exit:
 /**********************************************************************
  * Send Trap 64 on all new ports.
  **********************************************************************/
-static void __osm_state_mgr_report_new_ports(IN osm_sm_t * sm)
+static void state_mgr_report_new_ports(IN osm_sm_t * sm)
 {
 	ib_gid_t port_gid;
 	ib_mad_notice_attr_t notice;
@@ -889,7 +888,7 @@ static void __osm_state_mgr_report_new_ports(IN osm_sm_t * sm)
  * initialization), but here we'll clean the database from incorrect
  * information.
  **********************************************************************/
-static void __osm_state_mgr_check_tbl_consistency(IN osm_sm_t * sm)
+static void state_mgr_check_tbl_consistency(IN osm_sm_t * sm)
 {
 	cl_qmap_t *p_port_guid_tbl;
 	osm_port_t *p_port;
@@ -1060,7 +1059,7 @@ static void do_sweep(osm_sm_t * sm)
 		 * to do that we want all the ports to be considered
 		 * foreign
 		 */
-		__osm_state_mgr_clean_known_lids(sm);
+		state_mgr_clean_known_lids(sm);
 
 	sm->master_sm_found = 0;
 
@@ -1081,7 +1080,7 @@ static void do_sweep(osm_sm_t * sm)
 	    && sm->p_subn->force_heavy_sweep == FALSE
 	    && sm->p_subn->force_reroute == FALSE
 	    && sm->p_subn->subnet_initialization_error == FALSE
-	    && (__osm_state_mgr_light_sweep_start(sm) == IB_SUCCESS)) {
+	    && (state_mgr_light_sweep_start(sm) == IB_SUCCESS)) {
 		if (wait_for_pending_transactions(&sm->p_subn->p_osm->stats))
 			return;
 		if (!sm->p_subn->force_heavy_sweep) {
@@ -1147,12 +1146,12 @@ _repeat_discovery:
 	if (sm->p_subn->sm_state != IB_SMINFO_STATE_MASTER)
 		sm->p_subn->need_update = 1;
 
-	status = __osm_state_mgr_sweep_hop_0(sm);
+	status = state_mgr_sweep_hop_0(sm);
 	if (status != IB_SUCCESS ||
 	    wait_for_pending_transactions(&sm->p_subn->p_osm->stats))
 		return;
 
-	if (__osm_state_mgr_is_sm_port_down(sm) == TRUE) {
+	if (state_mgr_is_sm_port_down(sm) == TRUE) {
 		osm_log(sm->p_log, OSM_LOG_SYS, "SM port is down\n");
 		OSM_LOG_MSG_BOX(sm->p_log, OSM_LOG_VERBOSE, "SM PORT DOWN");
 
@@ -1164,7 +1163,7 @@ _repeat_discovery:
 		return;
 	}
 
-	status = __osm_state_mgr_sweep_hop_1(sm);
+	status = state_mgr_sweep_hop_1(sm);
 	if (status != IB_SUCCESS ||
 	    wait_for_pending_transactions(&sm->p_subn->p_osm->stats))
 		return;
@@ -1194,22 +1193,21 @@ _repeat_discovery:
 	 * see if it is higher than our local sm.
 	 */
 	if (sm->p_subn->sm_state == IB_SMINFO_STATE_MASTER) {
-		p_remote_sm = __osm_state_mgr_get_highest_sm(sm);
+		p_remote_sm = state_mgr_get_highest_sm(sm);
 		if (p_remote_sm != NULL) {
 			/* report new ports (trap 64) before leaving MASTER */
-			__osm_state_mgr_report_new_ports(sm);
+			state_mgr_report_new_ports(sm);
 
 			/* need to handover the mastership
 			 * to the remote sm, and move to standby */
-			__osm_state_mgr_send_handover(sm, p_remote_sm);
+			state_mgr_send_handover(sm, p_remote_sm);
 			osm_sm_state_mgr_process(sm,
 						 OSM_SM_SIGNAL_HANDOVER_SENT);
 			return;
 		} else {
 			/* We are the highest sm - check to see if there is
 			 * a remote SM that is in master state. */
-			p_remote_sm =
-			    __osm_state_mgr_exists_other_master_sm(sm);
+			p_remote_sm = state_mgr_exists_other_master_sm(sm);
 			if (p_remote_sm != NULL) {
 				/* There is a remote SM that is master.
 				 * need to wait for that SM to relinquish control
@@ -1255,7 +1253,7 @@ _repeat_discovery:
 
 	OSM_LOG_MSG_BOX(sm->p_log, OSM_LOG_VERBOSE,
 			"SM LID ASSIGNMENT COMPLETE - STARTING SUBNET LID CONFIG");
-	__osm_state_mgr_notify_lid_change(sm);
+	state_mgr_notify_lid_change(sm);
 
 	osm_lid_mgr_process_subnet(&sm->lid_mgr);
 	if (wait_for_pending_transactions(&sm->p_subn->p_osm->stats))
@@ -1265,7 +1263,7 @@ _repeat_discovery:
 	 * the port_lid_tbl under the subnet. There might be
 	 * errors in it if PortInfo Set requests didn't reach
 	 * their destination. */
-	__osm_state_mgr_check_tbl_consistency(sm);
+	state_mgr_check_tbl_consistency(sm);
 
 	OSM_LOG_MSG_BOX(sm->p_log, OSM_LOG_VERBOSE,
 			"LID ASSIGNMENT COMPLETE - STARTING SWITCH TABLE CONFIG");
@@ -1333,7 +1331,7 @@ _repeat_discovery:
 	/*
 	 * Send trap 64 on newly discovered endports
 	 */
-	__osm_state_mgr_report_new_ports(sm);
+	state_mgr_report_new_ports(sm);
 
 	/* in any case we zero this flag */
 	sm->p_subn->coming_out_of_standby = FALSE;
@@ -1347,7 +1345,7 @@ _repeat_discovery:
 	} else {
 		sm->p_subn->need_update = 0;
 		osm_dump_all(sm->p_subn->p_osm);
-		__osm_state_mgr_up_msg(sm);
+		state_mgr_up_msg(sm);
 		sm->p_subn->first_time_master_sweep = FALSE;
 
 		if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE))
diff --git a/opensm/opensm/osm_ucast_mgr.c b/opensm/opensm/osm_ucast_mgr.c
index fe0a446..20be5d3 100644
--- a/opensm/opensm/osm_ucast_mgr.c
+++ b/opensm/opensm/osm_ucast_mgr.c
@@ -107,8 +107,7 @@ osm_ucast_mgr_init(IN osm_ucast_mgr_t * const p_mgr, IN osm_sm_t * sm)
  Add each switch's own and neighbor LIDs to its LID matrix
 **********************************************************************/
 static void
-__osm_ucast_mgr_process_hop_0_1(IN cl_map_item_t * const p_map_item,
-				IN void *context)
+ucast_mgr_process_hop_0_1(IN cl_map_item_t * const p_map_item, IN void *context)
 {
 	osm_switch_t *const p_sw = (osm_switch_t *) p_map_item;
 	osm_node_t *p_remote_node;
@@ -135,11 +134,11 @@ __osm_ucast_mgr_process_hop_0_1(IN cl_map_item_t * const p_map_item,
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_ucast_mgr_process_neighbor(IN osm_ucast_mgr_t * const p_mgr,
-				 IN osm_switch_t * const p_this_sw,
-				 IN osm_switch_t * const p_remote_sw,
-				 IN const uint8_t port_num,
-				 IN const uint8_t remote_port_num)
+ucast_mgr_process_neighbor(IN osm_ucast_mgr_t * const p_mgr,
+			   IN osm_switch_t * const p_this_sw,
+			   IN osm_switch_t * const p_remote_sw,
+			   IN const uint8_t port_num,
+			   IN const uint8_t remote_port_num)
 {
 	osm_switch_t *p_sw;
 	cl_map_item_t *item;
@@ -204,10 +203,10 @@ find_and_add_remote_sys(osm_switch_t *sw, uint8_t port,
 }
 
 static void
-__osm_ucast_mgr_process_port(IN osm_ucast_mgr_t * const p_mgr,
-			     IN osm_switch_t * const p_sw,
-			     IN osm_port_t * const p_port,
-			     IN unsigned lid_offset)
+ucast_mgr_process_port(IN osm_ucast_mgr_t * const p_mgr,
+		       IN osm_switch_t * const p_sw,
+		       IN osm_port_t * const p_port,
+		       IN unsigned lid_offset)
 {
 	uint16_t min_lid_ho;
 	uint16_t max_lid_ho;
@@ -472,8 +471,8 @@ static void free_ports_priv(osm_ucast_mgr_t *mgr)
 }
 
 static void
-__osm_ucast_mgr_process_tbl(IN cl_map_item_t * const p_map_item,
-			    IN void *context)
+ucast_mgr_process_tbl(IN cl_map_item_t * const p_map_item,
+		      IN void *context)
 {
 	osm_ucast_mgr_t *p_mgr = context;
 	osm_switch_t *const p_sw = (osm_switch_t *) p_map_item;
@@ -504,7 +503,7 @@ __osm_ucast_mgr_process_tbl(IN cl_map_item_t * const p_map_item,
 		for (item = cl_qlist_head(list); item != cl_qlist_end(list);
 		     item = cl_qlist_next(item)) {
 			osm_port_t *port = cl_item_obj(item, port, list_item);
-			__osm_ucast_mgr_process_port(p_mgr, p_sw, port, i);
+			ucast_mgr_process_port(p_mgr, p_sw, port, i);
 		}
 	}
 
@@ -519,8 +518,8 @@ __osm_ucast_mgr_process_tbl(IN cl_map_item_t * const p_map_item,
 /**********************************************************************
  **********************************************************************/
 static void
-__osm_ucast_mgr_process_neighbors(IN cl_map_item_t * const p_map_item,
-				  IN void *context)
+ucast_mgr_process_neighbors(IN cl_map_item_t * const p_map_item,
+			    IN void *context)
 {
 	osm_switch_t *const p_sw = (osm_switch_t *) p_map_item;
 	osm_ucast_mgr_t *const p_mgr = (osm_ucast_mgr_t *) context;
@@ -560,10 +559,10 @@ __osm_ucast_mgr_process_neighbors(IN cl_map_item_t * const p_map_item,
 			if (!p_physp || !osm_link_is_healthy(p_physp))
 				continue;
 
-			__osm_ucast_mgr_process_neighbor(p_mgr, p_sw,
-							 p_remote_node->sw,
-							 (uint8_t) port_num,
-							 remote_port_num);
+			ucast_mgr_process_neighbor(p_mgr, p_sw,
+						   p_remote_node->sw,
+						   (uint8_t) port_num,
+						   remote_port_num);
 
 		}
 	}
@@ -659,8 +658,7 @@ int osm_ucast_mgr_build_lid_matrices(IN osm_ucast_mgr_t * const p_mgr)
 	   Set the switch matrices for each switch's own port 0 LID(s)
 	   then set the lid matrices for the each switch's leaf nodes.
 	 */
-	cl_qmap_apply_func(p_sw_guid_tbl,
-			   __osm_ucast_mgr_process_hop_0_1, p_mgr);
+	cl_qmap_apply_func(p_sw_guid_tbl, ucast_mgr_process_hop_0_1, p_mgr);
 
 	/*
 	   Get the switch matrices for each switch's neighbors.
@@ -701,8 +699,7 @@ int osm_ucast_mgr_build_lid_matrices(IN osm_ucast_mgr_t * const p_mgr)
 		     i++) {
 			p_mgr->some_hop_count_set = FALSE;
 			cl_qmap_apply_func(p_sw_guid_tbl,
-					   __osm_ucast_mgr_process_neighbors,
-					   p_mgr);
+					   ucast_mgr_process_neighbors, p_mgr);
 		}
 		OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 			"Min-hop propagated in %d steps\n", i);
@@ -905,8 +902,8 @@ static int ucast_mgr_build_lfts(osm_ucast_mgr_t *p_mgr)
 	cl_qmap_apply_func(&p_mgr->p_subn->port_guid_tbl,
 			   add_port_to_order_list, p_mgr);
 
-	cl_qmap_apply_func(&p_mgr->p_subn->sw_guid_tbl,
-			   __osm_ucast_mgr_process_tbl, p_mgr);
+	cl_qmap_apply_func(&p_mgr->p_subn->sw_guid_tbl, ucast_mgr_process_tbl,
+			   p_mgr);
 
 	cl_qlist_remove_all(&p_mgr->port_order_list);
 
diff --git a/opensm/opensm/osm_vl15intf.c b/opensm/opensm/osm_vl15intf.c
index 0703a4f..48a06af 100644
--- a/opensm/opensm/osm_vl15intf.c
+++ b/opensm/opensm/osm_vl15intf.c
@@ -109,7 +109,7 @@ static void vl15_send_mad(osm_vl15_t * p_vl, osm_madw_t * p_madw)
 		cl_atomic_dec(&p_vl->p_stats->qp0_unicasts_sent);
 }
 
-static void __osm_vl15_poller(IN void *p_ptr)
+static void vl15_poller(IN void *p_ptr)
 {
 	ib_api_status_t status;
 	osm_madw_t *p_madw;
@@ -272,7 +272,7 @@ osm_vl15_init(IN osm_vl15_t * const p_vl,
 	   Initialize the thread after all other dependent objects
 	   have been initialized.
 	 */
-	status = cl_thread_init(&p_vl->poller, __osm_vl15_poller, p_vl,
+	status = cl_thread_init(&p_vl->poller, vl15_poller, p_vl,
 				"opensm poller");
 	if (status != IB_SUCCESS)
 		goto Exit;



More information about the general mailing list