All of lore.kernel.org
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: David Howells <dhowells@redhat.com>, <davem@davemloft.net>
Cc: YueHaibing <yuehaibing@huawei.com>,
	<linux-afs@lists.infradead.org>, <netdev@vger.kernel.org>,
	<kernel-janitors@vger.kernel.org>
Subject: [PATCH net-next] rxrpc: Remove set but not used variable 'ioc'
Date: Tue, 9 Oct 2018 02:31:13 +0000	[thread overview]
Message-ID: <1539052273-34824-1-git-send-email-yuehaibing@huawei.com> (raw)

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

WARNING: multiple messages have this Message-ID (diff)
From: YueHaibing <yuehaibing@huawei.com>
To: David Howells <dhowells@redhat.com>, davem@davemloft.net
Cc: YueHaibing <yuehaibing@huawei.com>,
	linux-afs@lists.infradead.org, netdev@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: [PATCH net-next] rxrpc: Remove set but not used variable 'ioc'
Date: Tue, 09 Oct 2018 02:31:13 +0000	[thread overview]
Message-ID: <1539052273-34824-1-git-send-email-yuehaibing@huawei.com> (raw)
In-Reply-To: <1533180999-138562-1-git-send-email-weiyongjun1@huawei.com>

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

             reply	other threads:[~2018-10-09  9:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09  2:31 YueHaibing [this message]
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 10:13   ` David Howells
2018-10-09 12:04   ` YueHaibing
2018-10-09 12:04     ` YueHaibing
2018-10-11  8:38   ` Dan Carpenter
2018-10-11  8:38     ` Dan Carpenter
2018-10-11 20:38   ` David Howells
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 14:15   ` YueHaibing
2018-10-09 15:34   ` Sergei Shtylyov
2018-10-09 15:34     ` Sergei Shtylyov
2018-10-10  1:19     ` YueHaibing
2018-10-10  1:19       ` YueHaibing
2018-10-10  1:55   ` [PATCH v3] " YueHaibing
2018-10-10  2:06     ` YueHaibing
  -- strict thread matches above, loose matches on Subject: below --
2018-08-02  3:36 [PATCH net-next] rxrpc: Remove set but not used variable 'nowj' Wei Yongjun
2018-08-02  3:36 ` Wei Yongjun

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=1539052273-34824-1-git-send-email-yuehaibing@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-afs@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.