netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: ak@suse.de
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] Eliminate some unnecessary gotos in tcp v4 hash handling
Date: Fri, 20 Apr 2007 17:16:14 -0700 (PDT)	[thread overview]
Message-ID: <20070420.171614.46214862.davem@davemloft.net> (raw)
In-Reply-To: <200704051248.44989.ak@suse.de>

From: Andi Kleen <ak@suse.de>
Date: Thu, 5 Apr 2007 12:48:44 +0200

> The compiler eliminates them anyways and this makes the code easier to read
> and shorter.
> 
> Signed-off-by: Andi Kleen <ak@suse.de>

It depends upon who you ask :-)

For someone trying to verify "all code paths lead to foo and
therefore release resources and drop locks" it's always better
to use a goto to some common unwind handler at the end of
the function, regardless of what the compiler does with it.

When you're doing such an audit, return statements in the middle
of the function are red flags and make the audit more difficult.
:-)

But in these cases it's just straight returns and there are no
resources to release so I'll apply this patch, thanks!

  reply	other threads:[~2007-04-21  0:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-05 10:48 [PATCH] Eliminate some unnecessary gotos in tcp v4 hash handling Andi Kleen
2007-04-21  0:16 ` David Miller [this message]
2007-04-21  0:20 ` David Miller

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=20070420.171614.46214862.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ak@suse.de \
    --cc=netdev@vger.kernel.org \
    /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).