diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-05-09 19:14:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-09 19:37:39 -0400 |
commit | 88c80bee883e7687d2672f84fd6d0fa1cee3d348 (patch) | |
tree | ec5cae95a53f021fdbf9de7e5c7eddba35855f67 /net/tls/tls_device.c | |
parent | 15192f253e0484909292d8809f0b70d71fdc7291 (diff) |
net/tls: remove set but not used variables
Commit 4504ab0e6eb8 ("net/tls: Inform user space about send buffer availability")
made us report write_space regardless whether partial record
push was successful or not. Remove the now unused return value
to clean up the following W=1 warning:
net/tls/tls_device.c: In function ‘tls_device_write_space’:
net/tls/tls_device.c:546:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
int rc = 0;
^~
CC: Vakul Garg <vakul.garg@nxp.com>
CC: Boris Pismenny <borisp@mellanox.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls/tls_device.c')
-rw-r--r-- | net/tls/tls_device.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c index ad1580ac097a..ca54a7c7ec81 100644 --- a/net/tls/tls_device.c +++ b/net/tls/tls_device.c | |||
@@ -541,14 +541,11 @@ static int tls_device_push_pending_record(struct sock *sk, int flags) | |||
541 | 541 | ||
542 | void tls_device_write_space(struct sock *sk, struct tls_context *ctx) | 542 | void tls_device_write_space(struct sock *sk, struct tls_context *ctx) |
543 | { | 543 | { |
544 | int rc = 0; | ||
545 | |||
546 | if (!sk->sk_write_pending && tls_is_partially_sent_record(ctx)) { | 544 | if (!sk->sk_write_pending && tls_is_partially_sent_record(ctx)) { |
547 | gfp_t sk_allocation = sk->sk_allocation; | 545 | gfp_t sk_allocation = sk->sk_allocation; |
548 | 546 | ||
549 | sk->sk_allocation = GFP_ATOMIC; | 547 | sk->sk_allocation = GFP_ATOMIC; |
550 | rc = tls_push_partial_record(sk, ctx, | 548 | tls_push_partial_record(sk, ctx, MSG_DONTWAIT | MSG_NOSIGNAL); |
551 | MSG_DONTWAIT | MSG_NOSIGNAL); | ||
552 | sk->sk_allocation = sk_allocation; | 549 | sk->sk_allocation = sk_allocation; |
553 | } | 550 | } |
554 | } | 551 | } |