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

Hal Rosenstock halr at voltaire.com
Wed May 17 05:11:40 PDT 2006


On Wed, 2006-05-17 at 07:41, Michael S. Tsirkin wrote:
> 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.

But not all builds are that way though.

-- Hal





More information about the general mailing list