Skip to content

Commit

Permalink
rxrpc: Remove printks from rxrpc_recvmsg_data() to fix uninit var
Browse files Browse the repository at this point in the history
Remove _enter/_debug/_leave calls from rxrpc_recvmsg_data() of which one
uses an uninitialised variable.

Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
David Howells committed Sep 17, 2016
1 parent 8499790 commit ba39f3a
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions net/rxrpc/recvmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,6 @@ static int rxrpc_recvmsg_data(struct socket *sock, struct rxrpc_call *call,
unsigned int rx_pkt_offset, rx_pkt_len;
int ix, copy, ret = -EAGAIN, ret2;

_enter("");

rx_pkt_offset = call->rx_pkt_offset;
rx_pkt_len = call->rx_pkt_len;

Expand Down Expand Up @@ -343,8 +341,6 @@ static int rxrpc_recvmsg_data(struct socket *sock, struct rxrpc_call *call,
trace_rxrpc_recvmsg(call, rxrpc_recvmsg_cont, seq,
rx_pkt_offset, rx_pkt_len, 0);
}
_debug("recvmsg %x DATA #%u { %d, %d }",
sp->hdr.callNumber, seq, rx_pkt_offset, rx_pkt_len);

/* We have to handle short, empty and used-up DATA packets. */
remain = len - *_offset;
Expand All @@ -360,8 +356,6 @@ static int rxrpc_recvmsg_data(struct socket *sock, struct rxrpc_call *call,
}

/* handle piecemeal consumption of data packets */
_debug("copied %d @%zu", copy, *_offset);

rx_pkt_offset += copy;
rx_pkt_len -= copy;
*_offset += copy;
Expand All @@ -370,7 +364,6 @@ static int rxrpc_recvmsg_data(struct socket *sock, struct rxrpc_call *call,
if (rx_pkt_len > 0) {
trace_rxrpc_recvmsg(call, rxrpc_recvmsg_full, seq,
rx_pkt_offset, rx_pkt_len, 0);
_debug("buffer full");
ASSERTCMP(*_offset, ==, len);
ret = 0;
break;
Expand Down Expand Up @@ -398,7 +391,6 @@ static int rxrpc_recvmsg_data(struct socket *sock, struct rxrpc_call *call,
done:
trace_rxrpc_recvmsg(call, rxrpc_recvmsg_data_return, seq,
rx_pkt_offset, rx_pkt_len, ret);
_leave(" = %d [%u/%u]", ret, seq, top);
return ret;
}

Expand Down

0 comments on commit ba39f3a

Please sign in to comment.