From: Mitchell Blank Jr <mitch@sfgoth.com>
To: Andi Kleen <ak@suse.de>
Cc: netdev@oss.sgi.com
Subject: Re: [PATCH] small skbuff.[ch] tweaks
Date: Tue, 2 Sep 2003 02:49:42 -0700 [thread overview]
Message-ID: <20030902094942.GB53570@gaz.sfgoth.com> (raw)
In-Reply-To: <20030902090423.GD3889@wotan.suse.de>
Andi Kleen wrote:
> > > Both unlikely(!ptr) and likely(ptr) are not needed because gcc assumes this
> > > by default
> >
> > Is there any disadvantage to stating it explicitly?
>
> It makes the code much uglier.
Well I guess it's a matter of taste then. Personally I like unlikely()/
likely() a lot, even from just a readability standpoint. I think it provides
a nice hint to the structure of code while reading it ("ok, we're just
handling an error case here, the meat of the code is below") If anything they
help comment the code.
I certainly think they're preferable to "this is an unlikely error condition but
we shouldn't mark it as such because of some gcc trivia lets us save a few
characters of typing"
However if the consensus is that those unlikely()'s should be removed I'll be
happy to spin a new patch with those removed.
-Mitch
prev parent reply other threads:[~2003-09-02 9:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-02 8:16 [PATCH] small skbuff.[ch] tweaks Mitchell Blank Jr
2003-09-02 8:58 ` Andi Kleen
2003-09-02 9:10 ` Mitchell Blank Jr
2003-09-02 9:04 ` Andi Kleen
2003-09-02 9:49 ` Mitchell Blank Jr [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030902094942.GB53570@gaz.sfgoth.com \
--to=mitch@sfgoth.com \
--cc=ak@suse.de \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).