[ofa-general] Re: [PATCH] [TRIVIAL] opensm/osm_state_mgr.c: fixing soma data types and a corresponding log messages
Sasha Khapyorsky
sashak at voltaire.com
Wed Jun 25 09:55:34 PDT 2008
Hi Yevgeny,
On 09:41 Wed 25 Jun , Yevgeny Kliteynik wrote:
>
> Fixing some data types and corresponding log messages,
> thus solving compiler warnings.
>
> Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
> ---
> opensm/opensm/osm_state_mgr.c | 9 +++++----
> 1 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c
> index f15a4af..6ca276b 100644
> --- a/opensm/opensm/osm_state_mgr.c
> +++ b/opensm/opensm/osm_state_mgr.c
> @@ -863,7 +863,8 @@ static void __osm_state_mgr_check_tbl_consistency(IN osm_sm_t * sm)
> osm_port_t *p_port;
> osm_port_t *p_next_port;
> cl_ptr_vector_t *p_port_lid_tbl;
> - size_t max_lid, ref_size, curr_size, lid;
> + size_t ref_size, curr_size;
> + uint16_t max_lid, lid;
Finally it stores ref_size or cur_size values in max_lid, so it can
overflow. Could you be more specific about compiler warnings?
> osm_port_t *p_port_ref, *p_port_stored;
> cl_ptr_vector_t ref_port_lid_tbl;
> uint16_t min_lid_ho;
> @@ -921,7 +922,7 @@ static void __osm_state_mgr_check_tbl_consistency(IN osm_sm_t * sm)
> * with the new lid we wanted to give it in our
> * port_lid_tbl. */
> OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3322: "
> - "lid %u is wrongly assigned to port 0x%016"
> + "lid 0x%04x is wrongly assigned to port 0x%016"
It was discussed on the list (and even marked as a bug in bugzilla) that
unicast LIDs should be represented in decimal form in logs.
Sasha
More information about the general
mailing list