[ofa-general] Re: [PATCH] opensm/osm_lid_mgr.c: Trivial simplification in osm_lid_mgr_process_subnet

Sasha Khapyorsky sashak at voltaire.com
Fri Jul 31 09:55:19 PDT 2009


Hi Hal,

On 13:55 Thu 30 Jul     , Hal Rosenstock wrote:
> 
> Signed-off-by: Hal Rosenstock <hal.rosenstock at gmail.com>
> ---
> diff --git a/opensm/opensm/osm_lid_mgr.c b/opensm/opensm/osm_lid_mgr.c
> index 34625ba..64157e0 100644
> --- a/opensm/opensm/osm_lid_mgr.c
> +++ b/opensm/opensm/osm_lid_mgr.c
> @@ -1228,9 +1228,8 @@ int osm_lid_mgr_process_subnet(IN osm_lid_mgr_t * p_mgr)
>  			min_lid_ho, max_lid_ho);
>  
>  		/* the proc returns the fact it sent a set port info */
> -		if (lid_mgr_set_physp_pi(p_mgr, p_port, p_port->p_physp,
> -					 cl_hton16(min_lid_ho)))
> -			ret = -1;
> +		ret = lid_mgr_set_physp_pi(p_mgr, p_port, p_port->p_physp,
> +					   cl_hton16(min_lid_ho));

Actually it is not correct (and I tried to explain this to you some time
ago) - subsequent successive PortInfo set run will potentially overwrite
a previous failure status.

Sasha



More information about the general mailing list