netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] rxrpc: Remove set but not used variable 'ioc'
@ 2018-10-09  2:31 YueHaibing
  2018-10-09 10:13 ` David Howells
  2018-10-09 14:15 ` [PATCH v2] rxrpc: use correct kvec num while send response packet in rxrpc_reject_packets YueHaibing
  0 siblings, 2 replies; 9+ messages in thread
From: YueHaibing @ 2018-10-09  2:31 UTC (permalink / raw)
  To: David Howells, davem; +Cc: YueHaibing, linux-afs, netdev, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

net/rxrpc/output.c: In function 'rxrpc_reject_packets':
net/rxrpc/output.c:527:11: warning:
 variable 'ioc' set but not used [-Wunused-but-set-variable]

It never used since introduction in
commit ece64fec164f ("rxrpc: Emit BUSY packets when supposed to rather than ABORTs")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 net/rxrpc/output.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/rxrpc/output.c b/net/rxrpc/output.c
index e8fb892..f3ed16a 100644
--- a/net/rxrpc/output.c
+++ b/net/rxrpc/output.c
@@ -524,7 +524,7 @@ void rxrpc_reject_packets(struct rxrpc_local *local)
 	struct kvec iov[2];
 	size_t size;
 	__be32 code;
-	int ret, ioc;
+	int ret;
 
 	_enter("%d", local->debug_id);
 
@@ -548,13 +548,11 @@ void rxrpc_reject_packets(struct rxrpc_local *local)
 		case RXRPC_SKB_MARK_REJECT_BUSY:
 			whdr.type = RXRPC_PACKET_TYPE_BUSY;
 			size = sizeof(whdr);
-			ioc = 1;
 			break;
 		case RXRPC_SKB_MARK_REJECT_ABORT:
 			whdr.type = RXRPC_PACKET_TYPE_ABORT;
 			code = htonl(skb->priority);
 			size = sizeof(whdr) + sizeof(code);
-			ioc = 2;
 			break;
 		default:
 			rxrpc_free_skb(skb, rxrpc_skb_rx_freed);

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

end of thread, other threads:[~2018-10-12  4:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-09  2:31 [PATCH net-next] rxrpc: Remove set but not used variable 'ioc' YueHaibing
2018-10-09 10:13 ` David Howells
2018-10-09 12:04   ` YueHaibing
2018-10-11  8:38   ` Dan Carpenter
2018-10-11 20:38     ` David Howells
2018-10-09 14:15 ` [PATCH v2] rxrpc: use correct kvec num while send response packet in rxrpc_reject_packets YueHaibing
2018-10-09 15:34   ` Sergei Shtylyov
2018-10-10  1:19     ` YueHaibing
2018-10-10  2:06   ` [PATCH v3] " YueHaibing

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