mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 12:43:55 +08:00
CAPI: Drop capiminor's unused inbytes counter
The inbytes counter was only updated but never read. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
42792713f7
commit
68d7347b28
@ -98,7 +98,6 @@ struct capiminor {
|
|||||||
struct sk_buff *ttyskb;
|
struct sk_buff *ttyskb;
|
||||||
|
|
||||||
struct sk_buff_head inqueue;
|
struct sk_buff_head inqueue;
|
||||||
int inbytes;
|
|
||||||
struct sk_buff_head outqueue;
|
struct sk_buff_head outqueue;
|
||||||
int outbytes;
|
int outbytes;
|
||||||
|
|
||||||
@ -520,15 +519,12 @@ deref_tty:
|
|||||||
static void handle_minor_recv(struct capiminor *mp)
|
static void handle_minor_recv(struct capiminor *mp)
|
||||||
{
|
{
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
while ((skb = skb_dequeue(&mp->inqueue)) != NULL) {
|
|
||||||
unsigned int len = skb->len;
|
while ((skb = skb_dequeue(&mp->inqueue)) != NULL)
|
||||||
mp->inbytes -= len;
|
|
||||||
if (handle_recv_skb(mp, skb) < 0) {
|
if (handle_recv_skb(mp, skb) < 0) {
|
||||||
skb_queue_head(&mp->inqueue, skb);
|
skb_queue_head(&mp->inqueue, skb);
|
||||||
mp->inbytes += len;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int handle_minor_send(struct capiminor *mp)
|
static int handle_minor_send(struct capiminor *mp)
|
||||||
@ -659,7 +655,7 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
|
|||||||
datahandle, skb->len-CAPIMSG_LEN(skb->data));
|
datahandle, skb->len-CAPIMSG_LEN(skb->data));
|
||||||
#endif
|
#endif
|
||||||
skb_queue_tail(&mp->inqueue, skb);
|
skb_queue_tail(&mp->inqueue, skb);
|
||||||
mp->inbytes += skb->len;
|
|
||||||
handle_minor_recv(mp);
|
handle_minor_recv(mp);
|
||||||
|
|
||||||
} else if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_CONF) {
|
} else if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_CONF) {
|
||||||
|
Loading…
Reference in New Issue
Block a user