[ofa-general] [PATCH] osm: Trivial changes for compilation on windows
Yevgeny Kliteynik
kliteyn at dev.mellanox.co.il
Wed Feb 28 01:07:31 PST 2007
Hi Hal.
This patch has trivial data types changes and redefining a macro.
BTW, Sasha, do we still need this macro (NOISE_L in osm_ucast_updn.c)?
Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
osm/include/opensm/osm_switch.h | 4 ++--
osm/opensm/osm_ucast_mgr.c | 2 +-
osm/opensm/osm_ucast_updn.c | 6 +++++-
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/osm/include/opensm/osm_switch.h b/osm/include/opensm/osm_switch.h
index 1b3c35d..36c531c 100644
--- a/osm/include/opensm/osm_switch.h
+++ b/osm/include/opensm/osm_switch.h
@@ -105,8 +105,8 @@ typedef struct _osm_switch
osm_node_t *p_node;
ib_switch_info_t switch_info;
uint16_t max_lid_ho;
- unsigned num_ports;
- unsigned num_hops;
+ uint8_t num_ports;
+ uint16_t num_hops;
uint8_t **hops;
osm_port_profile_t *p_prof;
osm_fwd_tbl_t fwd_tbl;
diff --git a/osm/opensm/osm_ucast_mgr.c b/osm/opensm/osm_ucast_mgr.c
index 473baa6..2ab1c3b 100644
--- a/osm/opensm/osm_ucast_mgr.c
+++ b/osm/opensm/osm_ucast_mgr.c
@@ -411,7 +411,7 @@ __osm_ucast_mgr_setup_switch(
IN cl_map_item_t* const p_map_item,
IN void* cxt )
{
- uint16_t lids = cl_ptr_vector_get_size(&((osm_subn_t *)cxt)->port_lid_tbl);
+ uint16_t lids = (uint16_t)cl_ptr_vector_get_size(&((osm_subn_t *)cxt)->port_lid_tbl);
osm_switch_prepare_path_rebuild((osm_switch_t *)p_map_item,
lids ? lids - 1 : 0);
diff --git a/osm/opensm/osm_ucast_updn.c b/osm/opensm/osm_ucast_updn.c
index 93f54f4..679346e 100644
--- a/osm/opensm/osm_ucast_updn.c
+++ b/osm/opensm/osm_ucast_updn.c
@@ -97,7 +97,11 @@ struct updn_node {
unsigned visited;
};
+#ifndef WIN32
#define NOISE_L(log, fmt, arg...)
+#else
+#define NOISE_L
+#endif
/* ///////////////////////////////// */
/* Statics */
@@ -294,7 +298,7 @@ __updn_bfs_by_node(
"move from 0x%016" PRIx64 " rank: %u "
"to 0x%016" PRIx64" rank: %u\n",
cl_ntoh64(current_guid), u->rank,
- cl_ntoh64(remote_guid), rem->rank );
+ cl_ntoh64(remote_guid), rem_u->rank );
/* Check if this is a legal step : the only illegal step is going
from DOWN to UP */
if ((current_dir == DOWN) && (next_dir == UP))
--
1.4.4.1.GIT
More information about the general
mailing list