mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
0851115090
commit
775e5b71db
6 changed files with 24 additions and 21 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue