From: Adrian Bunk <bunk@stusta.de>
To: David Howells <dhowells@redhat.com>,
"David S. Miller" <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [RFC: 2.6 patch] net/rxrpc/ar-output.c: remove dead code
Date: Fri, 15 Jun 2007 23:45:20 +0200 [thread overview]
Message-ID: <20070615214520.GM3588@stusta.de> (raw)
This patch removes dead code spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
net/rxrpc/ar-output.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
--- linux-2.6.22-rc4-mm2/net/rxrpc/ar-output.c.old 2007-06-15 21:38:02.000000000 +0200
+++ linux-2.6.22-rc4-mm2/net/rxrpc/ar-output.c 2007-06-15 21:38:47.000000000 +0200
@@ -530,7 +530,7 @@ static int rxrpc_send_data(struct kiocb
struct sock *sk = &rx->sk;
long timeo;
bool more;
- int ret, ioc, segment, copied;
+ int ret, ioc, segment;
_enter(",,,{%zu},%zu", msg->msg_iovlen, len);
@@ -552,7 +552,6 @@ static int rxrpc_send_data(struct kiocb
skb = call->tx_pending;
call->tx_pending = NULL;
- copied = 0;
do {
int copy;
@@ -570,11 +569,11 @@ static int rxrpc_send_data(struct kiocb
call->acks_winsz) <= 0) {
ret = -EAGAIN;
if (msg->msg_flags & MSG_DONTWAIT)
- goto maybe_error;
+ goto out;
ret = rxrpc_wait_for_tx_window(rx, call,
&timeo);
if (ret < 0)
- goto maybe_error;
+ goto out;
}
max = call->conn->trans->peer->maxdata;
@@ -596,7 +595,7 @@ static int rxrpc_send_data(struct kiocb
skb = sock_alloc_send_skb(
sk, size, msg->msg_flags & MSG_DONTWAIT, &ret);
if (!skb)
- goto maybe_error;
+ goto out;
rxrpc_new_skb(skb);
@@ -723,11 +722,6 @@ call_aborted:
_leave(" = %d", ret);
return ret;
-maybe_error:
- if (copied)
- ret = copied;
- goto out;
-
efault:
ret = -EFAULT;
goto out;
next reply other threads:[~2007-06-15 21:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-15 21:45 Adrian Bunk [this message]
2007-06-15 22:16 ` [RFC: 2.6 patch] net/rxrpc/ar-output.c: remove dead code David Miller
2007-06-18 11:40 ` David Howells
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=20070615214520.GM3588@stusta.de \
--to=bunk@stusta.de \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--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).