[openib-general] Re: Re: Re: [PATCH][SDP][14/22] Whitespace clean up in sdp_proto.h
Michael S. Tsirkin
mst at mellanox.co.il
Tue Feb 22 13:27:02 PST 2005
Quoting r. Michael S. Tsirkin <mst at mellanox.co.il>:
> Subject: Re: Re: Re: [PATCH][SDP][14/22] Whitespace clean up in sdp_proto.h
>
> Quoting r. Tom Duffy <tduffy at sun.com>:
> > Subject: Re: [openib-general] Re: Re: [PATCH][SDP][14/22] Whitespace clean up in sdp_proto.h
> >
> > On Tue, 2005-02-22 at 22:32 +0200, Michael S. Tsirkin wrote:
> > > Good. By the way, do you plan to keep the convention of writing
> > > 0 == foo?
> > >
> > > I personally dislike it (and Linux expressed the same santiment at
> > > some point), this practice unnecessary with gcc
> > > which warns if you write if (foo = 0) accidentally, and
> > > kernel code itself never does it, but some in-kernel drivers
> > > do it ... its easy to fix more or less automatically.
> >
> > I don't mind that one, but I don't really care.
> >
> > How about the SDP_CHECK_NULL macro? It is used in most (but not all)
> > places in the SDP code. Does turning this checking off in non-debug
> > builds really speed things up a lot?
> >
> > -tduffy
> >
>
> I dont expect it to give a noticeable speedup, but neither do your
> whitespace cleanups :)
To clarify: please dont replace CHECK macros, with if, rather
we shall remove them altogether from the code.
As Libor pointed out elsewhere, this has a nice effect of
turning many int functions into void, documenting in a cleaner
way the fact that we dont really expect them to fail.
--
MST - Michael S. Tsirkin
More information about the general
mailing list