rxrpc: Drop the local endpoint arg from rxrpc_extract_addr_from_skb()

rxrpc_extract_addr_from_skb() doesn't use the argument that points to the
local endpoint, so remove the argument.

Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
David Howells 2018-10-04 09:32:28 +01:00
parent 46894a1359
commit 5a790b7375
6 changed files with 6 additions and 9 deletions

View File

@ -1111,8 +1111,7 @@ static inline void rxrpc_sysctl_exit(void) {}
/*
* utils.c
*/
int rxrpc_extract_addr_from_skb(struct rxrpc_local *, struct sockaddr_rxrpc *,
struct sk_buff *);
int rxrpc_extract_addr_from_skb(struct sockaddr_rxrpc *, struct sk_buff *);
static inline bool before(u32 seq1, u32 seq2)
{

View File

@ -280,7 +280,7 @@ static struct rxrpc_call *rxrpc_alloc_incoming_call(struct rxrpc_sock *rx,
peer = NULL;
if (!peer) {
peer = b->peer_backlog[peer_tail];
if (rxrpc_extract_addr_from_skb(local, &peer->srx, skb) < 0)
if (rxrpc_extract_addr_from_skb(&peer->srx, skb) < 0)
return NULL;
b->peer_backlog[peer_tail] = NULL;
smp_store_release(&b->peer_backlog_tail,

View File

@ -86,7 +86,7 @@ struct rxrpc_connection *rxrpc_find_connection_rcu(struct rxrpc_local *local,
_enter(",%x", sp->hdr.cid & RXRPC_CIDMASK);
if (rxrpc_extract_addr_from_skb(local, &srx, skb) < 0)
if (rxrpc_extract_addr_from_skb(&srx, skb) < 0)
goto not_found;
if (srx.transport.family != local->srx.transport.family &&

View File

@ -39,7 +39,7 @@ static void rxrpc_send_version_request(struct rxrpc_local *local,
_enter("");
if (rxrpc_extract_addr_from_skb(local, &srx, skb) < 0)
if (rxrpc_extract_addr_from_skb(&srx, skb) < 0)
return;
msg.msg_name = &srx.transport;

View File

@ -561,7 +561,7 @@ void rxrpc_reject_packets(struct rxrpc_local *local)
continue;
}
if (rxrpc_extract_addr_from_skb(local, &srx, skb) == 0) {
if (rxrpc_extract_addr_from_skb(&srx, skb) == 0) {
msg.msg_namelen = srx.transport_len;
whdr.epoch = htonl(sp->hdr.epoch);

View File

@ -17,9 +17,7 @@
/*
* Fill out a peer address from a socket buffer containing a packet.
*/
int rxrpc_extract_addr_from_skb(struct rxrpc_local *local,
struct sockaddr_rxrpc *srx,
struct sk_buff *skb)
int rxrpc_extract_addr_from_skb(struct sockaddr_rxrpc *srx, struct sk_buff *skb)
{
memset(srx, 0, sizeof(*srx));