[openib-general] Re: [PATCH] [TRIVIAL] OpenSM/osm_sm_mad_ctrl.c: Make some dead code be compiled out

Michael S. Tsirkin mst at mellanox.co.il
Wed May 17 04:41:33 PDT 2006


Quoting r. Hal Rosenstock <halr at voltaire.com>:
> Subject: [PATCH] [TRIVIAL] OpenSM/osm_sm_mad_ctrl.c: Make some dead code be compiled out
> 
> OpenSM/osm_sm_mad_ctrl.c: Make some dead code be compiled out
> 
> Signed-off-by: Hal Rosenstock <halr at voltaire.com>



> @@ -844,25 +846,26 @@ __osm_sm_mad_ctrl_send_err_cb(
>       lid.
>    */
>    /* For now - do not add the alternate dr path to the release */
> -  if (0)
> -    if ( p_madw->mad_addr.dest_lid != 0xFFFF )
> +#if 0
> +  if ( p_madw->mad_addr.dest_lid != 0xFFFF )

In my experience, if you compile with -O, gcc does a good enough job of
dead code elimination.

-- 
MST



More information about the general mailing list