linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC: 2.6 patch] net/rxrpc/ar-output.c: remove dead code
@ 2007-06-15 21:45 Adrian Bunk
  2007-06-15 22:16 ` David Miller
  2007-06-18 11:40 ` David Howells
  0 siblings, 2 replies; 3+ messages in thread
From: Adrian Bunk @ 2007-06-15 21:45 UTC (permalink / raw)
  To: David Howells, David S. Miller; +Cc: linux-kernel, netdev

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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC: 2.6 patch] net/rxrpc/ar-output.c: remove dead code
  2007-06-15 21:45 [RFC: 2.6 patch] net/rxrpc/ar-output.c: remove dead code Adrian Bunk
@ 2007-06-15 22:16 ` David Miller
  2007-06-18 11:40 ` David Howells
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2007-06-15 22:16 UTC (permalink / raw)
  To: bunk; +Cc: dhowells, linux-kernel, netdev

From: Adrian Bunk <bunk@stusta.de>
Date: Fri, 15 Jun 2007 23:45:20 +0200

> This patch removes dead code spotted by the Coverity checker.
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>

I'll let David H. decide how to handle these cleanups
and simplifications.  Thanks Adrian.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC: 2.6 patch] net/rxrpc/ar-output.c: remove dead code
  2007-06-15 21:45 [RFC: 2.6 patch] net/rxrpc/ar-output.c: remove dead code Adrian Bunk
  2007-06-15 22:16 ` David Miller
@ 2007-06-18 11:40 ` David Howells
  1 sibling, 0 replies; 3+ messages in thread
From: David Howells @ 2007-06-18 11:40 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: David S. Miller, linux-kernel, netdev

Adrian Bunk <bunk@stusta.de> wrote:

> This patch removes dead code spotted by the Coverity checker.

This is the wrong solution.  'copied' should be updated.

David

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-18 11:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-15 21:45 [RFC: 2.6 patch] net/rxrpc/ar-output.c: remove dead code Adrian Bunk
2007-06-15 22:16 ` David Miller
2007-06-18 11:40 ` David Howells

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).