提交 eef0ced0 编写于 作者: J Jan Kiszka 提交者: David S. Miller

CAPI: Drop return value of handle_minor_send

We did not evaluate handle_minor_send's return value, just (void)'ed it
away. Time for a cleanup.
Signed-off-by: NJan Kiszka <jan.kiszka@web.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2b72b5bd
...@@ -516,25 +516,24 @@ static void handle_minor_recv(struct capiminor *mp) ...@@ -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 tty_struct *tty;
struct sk_buff *skb; struct sk_buff *skb;
u16 len; u16 len;
int count = 0;
u16 errcode; u16 errcode;
u16 datahandle; u16 datahandle;
tty = tty_port_tty_get(&mp->port); tty = tty_port_tty_get(&mp->port);
if (!tty) if (!tty)
return 0; return;
if (mp->ttyoutstop) { if (mp->ttyoutstop) {
#if defined(_DEBUG_DATAFLOW) || defined(_DEBUG_TTYFUNCS) #if defined(_DEBUG_DATAFLOW) || defined(_DEBUG_TTYFUNCS)
printk(KERN_DEBUG "capi: send: tty stopped\n"); printk(KERN_DEBUG "capi: send: tty stopped\n");
#endif #endif
tty_kref_put(tty); tty_kref_put(tty);
return 0; return;
} }
while (1) { while (1) {
...@@ -570,12 +569,10 @@ static int handle_minor_send(struct capiminor *mp) ...@@ -570,12 +569,10 @@ static int handle_minor_send(struct capiminor *mp)
mp->outbytes += len; mp->outbytes += len;
spin_unlock_bh(&mp->outlock); spin_unlock_bh(&mp->outlock);
tty_kref_put(tty); break;
return count;
} }
errcode = capi20_put_message(mp->ap, skb); errcode = capi20_put_message(mp->ap, skb);
if (errcode == CAPI_NOERROR) { if (errcode == CAPI_NOERROR) {
count++;
#ifdef _DEBUG_DATAFLOW #ifdef _DEBUG_DATAFLOW
printk(KERN_DEBUG "capi: DATA_B3_REQ %u len=%u\n", printk(KERN_DEBUG "capi: DATA_B3_REQ %u len=%u\n",
datahandle, len); datahandle, len);
...@@ -600,7 +597,6 @@ static int handle_minor_send(struct capiminor *mp) ...@@ -600,7 +597,6 @@ static int handle_minor_send(struct capiminor *mp)
kfree_skb(skb); kfree_skb(skb);
} }
tty_kref_put(tty); tty_kref_put(tty);
return count;
} }
#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
...@@ -677,7 +673,7 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb) ...@@ -677,7 +673,7 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
tty_wakeup(tty); tty_wakeup(tty);
tty_kref_put(tty); tty_kref_put(tty);
} }
(void)handle_minor_send(mp); handle_minor_send(mp);
} else { } else {
/* ups, let capi application handle it :-) */ /* ups, let capi application handle it :-) */
...@@ -1114,7 +1110,7 @@ static int capinc_tty_write(struct tty_struct *tty, ...@@ -1114,7 +1110,7 @@ static int capinc_tty_write(struct tty_struct *tty,
mp->outbytes += skb->len; mp->outbytes += skb->len;
spin_unlock_bh(&mp->outlock); spin_unlock_bh(&mp->outlock);
(void)handle_minor_send(mp); handle_minor_send(mp);
return count; return count;
} }
...@@ -1157,7 +1153,7 @@ static int capinc_tty_put_char(struct tty_struct *tty, unsigned char ch) ...@@ -1157,7 +1153,7 @@ static int capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
spin_unlock_bh(&mp->outlock); spin_unlock_bh(&mp->outlock);
if (invoke_send) if (invoke_send)
(void)handle_minor_send(mp); handle_minor_send(mp);
return ret; return ret;
} }
...@@ -1179,7 +1175,7 @@ static void capinc_tty_flush_chars(struct tty_struct *tty) ...@@ -1179,7 +1175,7 @@ static void capinc_tty_flush_chars(struct tty_struct *tty)
mp->outbytes += skb->len; mp->outbytes += skb->len;
spin_unlock_bh(&mp->outlock); spin_unlock_bh(&mp->outlock);
(void)handle_minor_send(mp); handle_minor_send(mp);
} else } else
spin_unlock_bh(&mp->outlock); spin_unlock_bh(&mp->outlock);
...@@ -1269,7 +1265,7 @@ static void capinc_tty_start(struct tty_struct *tty) ...@@ -1269,7 +1265,7 @@ static void capinc_tty_start(struct tty_struct *tty)
printk(KERN_DEBUG "capinc_tty_start\n"); printk(KERN_DEBUG "capinc_tty_start\n");
#endif #endif
mp->ttyoutstop = 0; mp->ttyoutstop = 0;
(void)handle_minor_send(mp); handle_minor_send(mp);
} }
static void capinc_tty_hangup(struct tty_struct *tty) static void capinc_tty_hangup(struct tty_struct *tty)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册