Signed-off-by: Hal Rosenstock <[email protected]> --- diff --git a/infiniband-diags/src/grouping.c b/infiniband-diags/src/grouping.c index 048efc7..0c30726 100644 --- a/infiniband-diags/src/grouping.c +++ b/infiniband-diags/src/grouping.c @@ -336,9 +336,9 @@ static void get_router_slot(Node *node, Port *spineport) ch->slotnum = line_slot_2_sfb12[spineport->portnum]; /* this is a smart guess based on nodeguids order on sFB-12 module */ guessnum = spineport->node->nodeguid % 4; - // module 1 <--> remote anafa 3 - // module 2 <--> remote anafa 2 - // module 3 <--> remote anafa 1 + /* module 1 <--> remote anafa 3 */ + /* module 2 <--> remote anafa 2 */ + /* module 3 <--> remote anafa 1 */ ch->anafanum = (guessnum == 3? 1 : (guessnum == 1 ? 3 : 2)); } else if (is_spine_2004(spineport->node)) { ch->chassistype = ISR2004_CT; diff --git a/infiniband-diags/src/ibnetdiscover.c b/infiniband-diags/src/ibnetdiscover.c index 6946fd7..2c5240a 100644 --- a/infiniband-diags/src/ibnetdiscover.c +++ b/infiniband-diags/src/ibnetdiscover.c @@ -870,8 +870,10 @@ void dump_ports_report () Node *node; Port *port; - // If switch and LID == 0, search of other switch ports with - // valid LID and assign it to all ports of that switch + /* + * If switch and LID == 0, search of other switch ports with + * valid LID and assign it to all ports of that switch + */ for (b = 0; b <= MAXHOPS; b++) for (node = nodesdist[b]; node; node = node->dnext) if (node->type == SWITCH_NODE) { diff --git a/opensm/include/opensm/osm_console.h b/opensm/include/opensm/osm_console.h index 3ea8fa5..acb36d9 100644 --- a/opensm/include/opensm/osm_console.h +++ b/opensm/include/opensm/osm_console.h @@ -45,7 +45,7 @@ #endif /* __cplusplus */ BEGIN_C_DECLS -// TODO replace p_osm +/* TODO replace p_osm */ void osm_console(osm_opensm_t * p_osm); END_C_DECLS #endif /* _OSM_CONSOLE_H_ */ diff --git a/opensm/opensm/osm_console_io.c b/opensm/opensm/osm_console_io.c index 3d3ece4..8953ab7 100644 --- a/opensm/opensm/osm_console_io.c +++ b/opensm/opensm/osm_console_io.c @@ -59,7 +59,7 @@ static int is_local(char *str) { - // convenience - checks if just stdin/stdout + /* convenience - checks if just stdin/stdout */ if (str) return (strcmp(str, OSM_LOCAL_CONSOLE) == 0); return 0; @@ -67,7 +67,7 @@ static int is_local(char *str) static int is_loopback(char *str) { - // convenience - checks if socket based connection + /* convenience - checks if socket based connection */ if (str) return (strcmp(str, OSM_LOOPBACK_CONSOLE) == 0); return 0; @@ -75,7 +75,7 @@ static int is_loopback(char *str) static int is_remote(char *str) { - // convenience - checks if socket based connection + /* convenience - checks if socket based connection */ if (str) return (strcmp(str, OSM_REMOTE_CONSOLE) == 0) || is_loopback(str); @@ -84,7 +84,7 @@ static int is_remote(char *str) int is_console_enabled(osm_subn_opt_t * p_opt) { - // checks for a variety of types of consoles - default is off or 0 + /* checks for a variety of types of consoles - default is off or 0 */ if (p_opt) return (is_local(p_opt->console) || is_loopback(p_opt->console) @@ -210,14 +210,14 @@ int osm_console_init(osm_subn_opt_t * opt, osm_console_t * p_oct, osm_log_t * p_ /* clean up and release resources */ void osm_console_exit(osm_console_t * p_oct, osm_log_t * p_log) { - // clean up and release resources, currently just close the socket + /* clean up and release resources, currently just close the socket */ osm_console_close(p_oct, p_log); } #ifdef ENABLE_OSM_CONSOLE_SOCKET int cio_open(osm_console_t * p_oct, int new_fd, osm_log_t * p_log) { - // returns zero if opened fine, -1 otherwise + /* returns zero if opened fine, -1 otherwise */ char *p_line; size_t len; ssize_t n; diff --git a/opensm/opensm/osm_ucast_lash.c b/opensm/opensm/osm_ucast_lash.c index 4e783bf..17611f7 100644 --- a/opensm/opensm/osm_ucast_lash.c +++ b/opensm/opensm/osm_ucast_lash.c @@ -679,7 +679,7 @@ static void free_lash_structures(lash_t * p_lash) OSM_LOG_ENTER(p_log); - // free cdg_vertex_matrix + /* free cdg_vertex_matrix */ for (i = 0; i < p_lash->vl_min; i++) { for (j = 0; j < num_switches; j++) { for (k = 0; k < num_switches; k++) @@ -695,7 +695,7 @@ static void free_lash_structures(lash_t * p_lash) if (p_lash->cdg_vertex_matrix) free(p_lash->cdg_vertex_matrix); - // free virtual_location + /* free virtual_location */ for (i = 0; i < num_switches; i++) { for (j = 0; j < num_switches; j++) { if (p_lash->virtual_location[i][j]) @@ -723,7 +723,7 @@ static int init_lash_structures(lash_t * p_lash) OSM_LOG_ENTER(p_log); - // initialise cdg_vertex_matrix[num_switches][num_switches][num_switches] + /* initialise cdg_vertex_matrix[num_switches][num_switches][num_switches] */ p_lash->cdg_vertex_matrix = (cdg_vertex_t ****) malloc(vl_min * sizeof(cdg_vertex_t ****)); for (i = 0; i < vl_min; i++) { @@ -749,8 +749,10 @@ static int init_lash_structures(lash_t * p_lash) } } - // initialise virtual_location[num_switches][num_switches][num_layers], - // default value = 0 + /* + * initialise virtual_location[num_switches][num_switches][num_layers], + * default value = 0 + */ p_lash->virtual_location = (int ***)malloc(num_switches * sizeof(int ***)); if (p_lash->virtual_location == NULL) @@ -775,7 +777,7 @@ static int init_lash_structures(lash_t * p_lash) } } - // initialise num_mst_in_lane[num_switches], default 0 + /* initialise num_mst_in_lane[num_switches], default 0 */ p_lash->num_mst_in_lane = (int *)malloc(num_switches * sizeof(int)); if (p_lash->num_mst_in_lane == NULL) goto Exit_Mem_Error; @@ -997,7 +999,7 @@ static void populate_fwd_tbls(lash_t * p_lash) p_next_sw = (osm_switch_t *) cl_qmap_head(&p_subn->sw_guid_tbl); - // Go through each swtich individually + /* Go through each swtich individually */ while (p_next_sw != (osm_switch_t *) cl_qmap_end(&p_subn->sw_guid_tbl)) { uint64_t current_guid; switch_t *sw; @@ -1051,7 +1053,7 @@ static void populate_fwd_tbls(lash_t * p_lash) dst_lash_switch_id, physical_egress_port); } - } // for + } /* for */ osm_ucast_mgr_set_fwd_table(&p_osm->sm.ucast_mgr, p_sw); } OSM_LOG_EXIT(p_log); @@ -1069,7 +1071,7 @@ static void osm_lash_process_switch(lash_t * p_lash, osm_switch_t * p_sw) switch_a_lash_id = get_lash_id(p_sw); port_count = osm_node_get_num_physp(p_sw->p_node); - // starting at port 1, ignoring management port on switch + /* starting at port 1, ignoring management port on switch */ for (i = 1; i < port_count; i++) { p_current_physp = osm_node_get_physp_ptr(p_sw->p_node, i); @@ -1148,7 +1150,7 @@ static int discover_network_properties(lash_t * p_lash) return -1; memset(p_lash->switches, 0, p_lash->num_switches * sizeof(switch_t *)); - vl_min = 5; // set to a high value + vl_min = 5; /* set to a high value */ p_next_sw = (osm_switch_t *) cl_qmap_head(&p_subn->sw_guid_tbl); while (p_next_sw != (osm_switch_t *) cl_qmap_end(&p_subn->sw_guid_tbl)) { @@ -1163,7 +1165,7 @@ static int discover_network_properties(lash_t * p_lash) port_count = osm_node_get_num_physp(p_sw->p_node); - // Note, ignoring port 0. management port + /* Note, ignoring port 0. management port */ for (i = 1; i < port_count; i++) { osm_physp_t *p_current_physp = osm_node_get_physp_ptr(p_sw->p_node, i); @@ -1178,8 +1180,8 @@ static int discover_network_properties(lash_t * p_lash) if (port_vl_min && port_vl_min < vl_min) vl_min = port_vl_min; } - } // for - } // while + } /* for */ + } /* while */ vl_min = 1 << (vl_min - 1); if (vl_min > 15) @@ -1219,7 +1221,7 @@ static int lash_process(void *context) p_lash->balance_limit = 6; - // everything starts here + /* everything starts here */ lash_cleanup(p_lash); return_status = discover_network_properties(p_lash); _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
