From patchwork Mon Feb 8 20:12:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 44823 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id B632BB7CF5 for ; Tue, 9 Feb 2010 07:16:27 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755231Ab0BHUOd (ORCPT ); Mon, 8 Feb 2010 15:14:33 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:43481 "EHLO fmmailgate02.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755000Ab0BHUNQ (ORCPT ); Mon, 8 Feb 2010 15:13:16 -0500 Received: from smtp05.web.de (fmsmtp05.dlan.cinetic.de [172.20.4.166]) by fmmailgate02.web.de (Postfix) with ESMTP id 9938814D52C32; Mon, 8 Feb 2010 21:13:15 +0100 (CET) Received: from [88.65.45.120] (helo=localhost.localdomain) by smtp05.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #314) id 1NeZyt-0006fo-01; Mon, 08 Feb 2010 21:13:15 +0100 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 38/41] CAPI: Drop return value of handle_minor_send Date: Mon, 8 Feb 2010 21:12:42 +0100 Message-Id: X-Mailer: git-send-email 1.6.0.2 In-Reply-To: References: In-Reply-To: References: X-Sender: jan.kiszka@web.de X-Provags-ID: V01U2FsdGVkX19AI14sCvpCwq+qjzxJVxlG/qxWfLfzF2+oqClR BjRh4ioxNkkkUimL6K3JQoY3jGIOgcy53CxJ2a4d/7Cw/VbOPx fXMcUSkaE= Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org We did not evaluate handle_minor_send's return value, just (void)'ed it away. Time for a cleanup. Signed-off-by: Jan Kiszka --- drivers/isdn/capi/capi.c | 22 +++++++++------------- 1 files changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 40b81b4..ee58375 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -516,25 +516,24 @@ static void handle_minor_recv(struct capiminor *mp) } } -static int handle_minor_send(struct capiminor *mp) +static void handle_minor_send(struct capiminor *mp) { struct tty_struct *tty; struct sk_buff *skb; u16 len; - int count = 0; u16 errcode; u16 datahandle; tty = tty_port_tty_get(&mp->port); if (!tty) - return 0; + return; if (mp->ttyoutstop) { #if defined(_DEBUG_DATAFLOW) || defined(_DEBUG_TTYFUNCS) printk(KERN_DEBUG "capi: send: tty stopped\n"); #endif tty_kref_put(tty); - return 0; + return; } while (1) { @@ -570,12 +569,10 @@ static int handle_minor_send(struct capiminor *mp) mp->outbytes += len; spin_unlock_bh(&mp->outlock); - tty_kref_put(tty); - return count; + break; } errcode = capi20_put_message(mp->ap, skb); if (errcode == CAPI_NOERROR) { - count++; #ifdef _DEBUG_DATAFLOW printk(KERN_DEBUG "capi: DATA_B3_REQ %u len=%u\n", datahandle, len); @@ -600,7 +597,6 @@ static int handle_minor_send(struct capiminor *mp) kfree_skb(skb); } tty_kref_put(tty); - return count; } #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ @@ -677,7 +673,7 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb) tty_wakeup(tty); tty_kref_put(tty); } - (void)handle_minor_send(mp); + handle_minor_send(mp); } else { /* ups, let capi application handle it :-) */ @@ -1114,7 +1110,7 @@ static int capinc_tty_write(struct tty_struct *tty, mp->outbytes += skb->len; spin_unlock_bh(&mp->outlock); - (void)handle_minor_send(mp); + handle_minor_send(mp); return count; } @@ -1157,7 +1153,7 @@ unlock_out: spin_unlock_bh(&mp->outlock); if (invoke_send) - (void)handle_minor_send(mp); + handle_minor_send(mp); return ret; } @@ -1179,7 +1175,7 @@ static void capinc_tty_flush_chars(struct tty_struct *tty) mp->outbytes += skb->len; spin_unlock_bh(&mp->outlock); - (void)handle_minor_send(mp); + handle_minor_send(mp); } else spin_unlock_bh(&mp->outlock); @@ -1269,7 +1265,7 @@ static void capinc_tty_start(struct tty_struct *tty) printk(KERN_DEBUG "capinc_tty_start\n"); #endif mp->ttyoutstop = 0; - (void)handle_minor_send(mp); + handle_minor_send(mp); } static void capinc_tty_hangup(struct tty_struct *tty)