[ofa-general] [PATCH][TRIVIAL] osm_port_profile: Change some variable names for consistency

Hal Rosenstock hrosenstock at xsigo.com
Thu Jun 26 07:07:51 PDT 2008


osm_port_profile: Change some variable names for consistency

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

diff --git a/opensm/include/opensm/osm_port_profile.h b/opensm/include/opensm/osm_port_profile.h
index 0376686..e1bdd4a 100644
--- a/opensm/include/opensm/osm_port_profile.h
+++ b/opensm/include/opensm/osm_port_profile.h
@@ -198,10 +198,10 @@ osm_port_prof_path_count_get(IN const osm_port_profile_t * const p_prof)
 */
 static inline boolean_t
 osm_port_prof_is_ignored_port(IN const osm_subn_t * p_subn,
-			      IN ib_net64_t port_guid, IN uint8_t port_num)
+			      IN ib_net64_t node_guid, IN uint8_t port_num)
 {
 	const cl_map_t *p_map = &p_subn->port_prof_ignore_guids;
-	const void *p_obj = cl_map_get(p_map, port_guid);
+	const void *p_obj = cl_map_get(p_map, node_guid);
 	size_t res;
 
 	// HACK: we currently support ignoring ports 0 - 31
@@ -217,8 +217,8 @@ osm_port_prof_is_ignored_port(IN const osm_subn_t * p_subn,
 *	p_subn
 *		[in] Pointer to the OSM Subnet object.
 *
-*	port_guid
-*		[in] The port guid
+*	node_guid
+*		[in] The node guid
 *
 * RETURN VALUE
 *	None.
@@ -233,16 +233,16 @@ osm_port_prof_is_ignored_port(IN const osm_subn_t * p_subn,
 *	osm_port_prof_set_ignored_port
 *
 * DESCRIPTION
-*	Set the ignored property of the port.
+*	Set the ignored property of a port.
 *
 * SYNOPSIS
 */
 static inline void
 osm_port_prof_set_ignored_port(IN osm_subn_t * p_subn,
-			       IN ib_net64_t port_guid, IN uint8_t port_num)
+			       IN ib_net64_t node_guid, IN uint8_t port_num)
 {
 	cl_map_t *p_map = &p_subn->port_prof_ignore_guids;
-	const void *p_obj = cl_map_get(p_map, port_guid);
+	const void *p_obj = cl_map_get(p_map, node_guid);
 	size_t value = 0;
 
 	// HACK: we currently support ignoring ports 0 - 31
@@ -250,11 +250,11 @@ osm_port_prof_set_ignored_port(IN osm_subn_t * p_subn,
 
 	if (p_obj != NULL) {
 		value = (size_t) p_obj;
-		cl_map_remove(p_map, port_guid);
+		cl_map_remove(p_map, node_guid);
 	}
 
 	value = value | (1 << port_num);
-	cl_map_insert(p_map, port_guid, (void *)value);
+	cl_map_insert(p_map, node_guid, (void *)value);
 }
 
 /*
@@ -262,8 +262,8 @@ osm_port_prof_set_ignored_port(IN osm_subn_t * p_subn,
 *	p_subn
 *		[in] Pointer to the OSM Subnet object.
 *
-*	port_guid
-*		[in] The port guid
+*	node_guid
+*		[in] The node guid
 *
 * RETURN VALUE
 *	None.
diff --git a/opensm/opensm/main.c b/opensm/opensm/main.c
index 77c4b19..7c7525b 100644
--- a/opensm/opensm/main.c
+++ b/opensm/opensm/main.c
@@ -464,7 +464,7 @@ parse_ignore_guids_file(IN char *guids_file_name, IN osm_opensm_t * p_osm)
 	char line[OSM_MAX_IGNORE_GUID_LINES_LEN];
 	char *p_c, *p_ec;
 	uint32_t line_num = 0;
-	uint64_t port_guid;
+	uint64_t node_guid;
 	ib_api_status_t status = IB_SUCCESS;
 	unsigned int port_num;
 
@@ -487,7 +487,7 @@ parse_ignore_guids_file(IN char *guids_file_name, IN osm_opensm_t * p_osm)
 		p_c = line;
 		while ((*p_c == ' ') && (*p_c != '\0'))
 			p_c++;
-		port_guid = strtoull(p_c, &p_ec, 16);
+		node_guid = strtoull(p_c, &p_ec, 16);
 		if (p_ec == p_c) {
 			OSM_LOG(&p_osm->log, OSM_LOG_ERROR, "ERR 0602: "
 				"Error in line (%u): %s\n", line_num, line);
@@ -506,10 +506,10 @@ parse_ignore_guids_file(IN char *guids_file_name, IN osm_opensm_t * p_osm)
 
 		/* ok insert it */
 		osm_port_prof_set_ignored_port(&p_osm->subn,
-					       cl_hton64(port_guid), port_num);
+					       cl_hton64(node_guid), port_num);
 		OSM_LOG(&p_osm->log, OSM_LOG_DEBUG,
-			"Inserted Port: 0x%" PRIx64
-			" PortNum: 0x%X into ignored guids list\n", port_guid,
+			"Inserted Node: 0x%" PRIx64
+			" PortNum: 0x%X into ignored guids list\n", node_guid,
 			port_num);
 
 	}





More information about the general mailing list