Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755351Ab0BHUPv (ORCPT ); Mon, 8 Feb 2010 15:15:51 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:43445 "EHLO fmmailgate02.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754977Ab0BHUNP (ORCPT ); Mon, 8 Feb 2010 15:13:15 -0500 From: Jan Kiszka To: David Miller , Karsten Keil Cc: linux-kernel@vger.kernel.org, i4ldeveloper@listserv.isdn4linux.de, isdn4linux@listserv.isdn4linux.de, netdev@vger.kernel.org, Alan Cox , Marcel Holtmann Subject: [PATCH v2 35/41] CAPI: Drop capiminor's unused inbytes counter Date: Mon, 8 Feb 2010 21:12:39 +0100 Message-Id: X-Mailer: git-send-email 1.6.0.2 In-Reply-To: References: In-Reply-To: References: X-Provags-ID: V01U2FsdGVkX19nXvmpq+ch7PHDvWsOIFKzSaCYIn8jHHnCc4BE aLQtGDEL9ukuMqY2YQTqY9oeFcw4C9sQt8GDKBY4KzXE6CZf2z 4AZePYhg0= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1574 Lines: 54 The inbytes counter was only updated but never read. Signed-off-by: Jan Kiszka --- drivers/isdn/capi/capi.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 08d5a8a..be85c8c 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -98,7 +98,6 @@ struct capiminor { struct sk_buff *ttyskb; struct sk_buff_head inqueue; - int inbytes; struct sk_buff_head outqueue; int outbytes; @@ -520,15 +519,12 @@ deref_tty: static void handle_minor_recv(struct capiminor *mp) { struct sk_buff *skb; - while ((skb = skb_dequeue(&mp->inqueue)) != NULL) { - unsigned int len = skb->len; - mp->inbytes -= len; + + while ((skb = skb_dequeue(&mp->inqueue)) != NULL) if (handle_recv_skb(mp, skb) < 0) { skb_queue_head(&mp->inqueue, skb); - mp->inbytes += len; return; } - } } 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)); #endif skb_queue_tail(&mp->inqueue, skb); - mp->inbytes += skb->len; + handle_minor_recv(mp); } else if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_CONF) { -- 1.6.0.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/