diff options
author | David Howells <dhowells@redhat.com> | 2016-09-30 15:26:03 +0300 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2016-09-30 16:39:28 +0300 |
commit | 775e5b71db6aca47d49d43d08751f2e8ebad7f60 (patch) | |
tree | 54beb3163dd5d3184d55cf8c46ae60fed3cbb963 /net/rxrpc/recvmsg.c | |
parent | 0851115090a3eb9585d6a804a61e47f3d89ac2a8 (diff) | |
download | linux-775e5b71db6aca47d49d43d08751f2e8ebad7f60.tar.xz |
rxrpc: The offset field in struct rxrpc_skb_priv is unnecessary
The offset field in struct rxrpc_skb_priv is unnecessary as the value can
always be calculated.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/recvmsg.c')
-rw-r--r-- | net/rxrpc/recvmsg.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c index 038ae62ddb4d..f05ea0a88076 100644 --- a/net/rxrpc/recvmsg.c +++ b/net/rxrpc/recvmsg.c @@ -261,15 +261,13 @@ static int rxrpc_locate_data(struct rxrpc_call *call, struct sk_buff *skb, u8 *_annotation, unsigned int *_offset, unsigned int *_len) { - struct rxrpc_skb_priv *sp = rxrpc_skb(skb); - unsigned int offset = *_offset; + unsigned int offset = sizeof(struct rxrpc_wire_header); unsigned int len = *_len; int ret; u8 annotation = *_annotation; /* Locate the subpacket */ - offset = sp->offset; - len = skb->len - sp->offset; + len = skb->len - offset; if ((annotation & RXRPC_RX_ANNO_JUMBO) > 0) { offset += (((annotation & RXRPC_RX_ANNO_JUMBO) - 1) * RXRPC_JUMBO_SUBPKTLEN); |