[openib-general] [PATCH 10/13] osm: port to WinIB stack : opensm/osm_pkey.c
Eitan Zahavi
eitan at mellanox.co.il
Sun Sep 17 09:00:01 PDT 2006
Hi Hal
Some explicit casting required and also pkey blocks are only uint16_t .
Thanks
Eitan
Signed-off-by: Eitan Zahavi <eitan at mellanox.co.il>
Index: opensm/osm_pkey.c
===================================================================
--- opensm/osm_pkey.c (revision 9502)
+++ opensm/osm_pkey.c (working copy)
@@ -116,7 +116,7 @@ void osm_pkey_tbl_init_new_blocks(
IN const osm_pkey_tbl_t *p_pkey_tbl)
{
ib_pkey_table_t *p_block;
- int16_t b, num_blocks = cl_ptr_vector_get_size(&p_pkey_tbl->new_blocks);
+ size_t b, num_blocks = cl_ptr_vector_get_size(&p_pkey_tbl->new_blocks);
for (b = 0; b < num_blocks; b++)
if ((p_block = cl_ptr_vector_get(&p_pkey_tbl->new_blocks, b)))
@@ -279,17 +279,17 @@ ib_api_status_t
osm_pkey_tbl_get_block_and_idx(
IN osm_pkey_tbl_t *p_pkey_tbl,
IN uint16_t *p_pkey,
- OUT uint32_t *p_block_idx,
+ OUT uint16_t *p_block_idx,
OUT uint8_t *p_pkey_idx)
{
- uint32_t num_of_blocks;
- uint32_t block_index;
+ uint16_t num_of_blocks;
+ uint16_t block_index;
ib_pkey_table_t *block;
CL_ASSERT( p_block_idx != NULL );
CL_ASSERT( p_pkey_idx != NULL );
- num_of_blocks = cl_ptr_vector_get_size( &p_pkey_tbl->blocks);
+ num_of_blocks = (uint16_t)cl_ptr_vector_get_size( &p_pkey_tbl->blocks);
for (block_index = 0; block_index < num_of_blocks; block_index++)
{
block = osm_pkey_tbl_block_get(p_pkey_tbl, block_index);
More information about the general
mailing list