[openib-general] Re: [PATCH] [TRIVIAL] OpenSM/osm_sm_mad_ctrl.c: Make some dead code be compiled out
Sasha Khapyorsky
sashak at voltaire.com
Wed May 17 10:03:48 PDT 2006
On 08:11 Wed 17 May , Hal Rosenstock wrote:
> 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.
Also "#if 0" makes temporary disabled code more "visible" (for future
improvements).
Sasha.
More information about the general
mailing list