Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1478441
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH net-next 1/2] rxrpc: Fix returns of call completion helpers |
| Date | 2016-09-07 17:50 +0200 |
| Message-ID | <seNgR-1zr-15@gated-at.bofh.it> (permalink) |
| References | <seN7b-1w7-19@gated-at.bofh.it> |
| Organization | Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 |
rxrpc_set_call_completion() returns bool, not int, so the ret variable
should match this.
rxrpc_call_completed() and __rxrpc_call_completed() should return the value
of rxrpc_set_call_completion().
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/ar-internal.h | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 3addda4bfa6b..0353399792b6 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -608,7 +608,7 @@ static inline bool rxrpc_set_call_completion(struct rxrpc_call *call,
u32 abort_code,
int error)
{
- int ret;
+ bool ret;
write_lock_bh(&call->state_lock);
ret = __rxrpc_set_call_completion(call, compl, abort_code, error);
@@ -619,16 +619,19 @@ static inline bool rxrpc_set_call_completion(struct rxrpc_call *call,
/*
* Record that a call successfully completed.
*/
-static inline void __rxrpc_call_completed(struct rxrpc_call *call)
+static inline bool __rxrpc_call_completed(struct rxrpc_call *call)
{
- __rxrpc_set_call_completion(call, RXRPC_CALL_SUCCEEDED, 0, 0);
+ return __rxrpc_set_call_completion(call, RXRPC_CALL_SUCCEEDED, 0, 0);
}
-static inline void rxrpc_call_completed(struct rxrpc_call *call)
+static inline bool rxrpc_call_completed(struct rxrpc_call *call)
{
+ bool ret;
+
write_lock_bh(&call->state_lock);
- __rxrpc_call_completed(call);
+ ret = __rxrpc_call_completed(call);
write_unlock_bh(&call->state_lock);
+ return ret;
}
/*
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next 0/2] rxrpc: Local abort tracepoint David Howells <dhowells@redhat.com> - 2016-09-07 17:40 +0200 [PATCH net-next 1/2] rxrpc: Fix returns of call completion helpers David Howells <dhowells@redhat.com> - 2016-09-07 17:50 +0200 [PATCH net-next 2/2] rxrpc: Add tracepoint for working out where aborts happen David Howells <dhowells@redhat.com> - 2016-09-07 17:50 +0200
csiph-web