aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@web.de>2010-02-08 05:12:42 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-16 19:01:35 -0500
commiteef0ced02840cdbc9045b24e73378401aae04d4c (patch)
tree340ca3ca02e444980bd8a1a08620379dd14a5b91 /drivers
parent2b72b5bd65f00bce786ca080aca27e91e90af6df (diff)
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: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/isdn/capi/capi.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 40b81b460e81..ee5837522f5a 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)
516 } 516 }
517} 517}
518 518
519static int handle_minor_send(struct capiminor *mp) 519static void handle_minor_send(struct capiminor *mp)
520{ 520{
521 struct tty_struct *tty; 521 struct tty_struct *tty;
522 struct sk_buff *skb; 522 struct sk_buff *skb;
523 u16 len; 523 u16 len;
524 int count = 0;
525 u16 errcode; 524 u16 errcode;
526 u16 datahandle; 525 u16 datahandle;
527 526
528 tty = tty_port_tty_get(&mp->port); 527 tty = tty_port_tty_get(&mp->port);
529 if (!tty) 528 if (!tty)
530 return 0; 529 return;
531 530
532 if (mp->ttyoutstop) { 531 if (mp->ttyoutstop) {
533#if defined(_DEBUG_DATAFLOW) || defined(_DEBUG_TTYFUNCS) 532#if defined(_DEBUG_DATAFLOW) || defined(_DEBUG_TTYFUNCS)
534 printk(KERN_DEBUG "capi: send: tty stopped\n"); 533 printk(KERN_DEBUG "capi: send: tty stopped\n");
535#endif 534#endif
536 tty_kref_put(tty); 535 tty_kref_put(tty);
537 return 0; 536 return;
538 } 537 }
539 538
540 while (1) { 539 while (1) {
@@ -570,12 +569,10 @@ static int handle_minor_send(struct capiminor *mp)
570 mp->outbytes += len; 569 mp->outbytes += len;
571 spin_unlock_bh(&mp->outlock); 570 spin_unlock_bh(&mp->outlock);
572 571
573 tty_kref_put(tty); 572 break;
574 return count;
575 } 573 }
576 errcode = capi20_put_message(mp->ap, skb); 574 errcode = capi20_put_message(mp->ap, skb);
577 if (errcode == CAPI_NOERROR) { 575 if (errcode == CAPI_NOERROR) {
578 count++;
579#ifdef _DEBUG_DATAFLOW 576#ifdef _DEBUG_DATAFLOW
580 printk(KERN_DEBUG "capi: DATA_B3_REQ %u len=%u\n", 577 printk(KERN_DEBUG "capi: DATA_B3_REQ %u len=%u\n",
581 datahandle, len); 578 datahandle, len);
@@ -600,7 +597,6 @@ static int handle_minor_send(struct capiminor *mp)
600 kfree_skb(skb); 597 kfree_skb(skb);
601 } 598 }
602 tty_kref_put(tty); 599 tty_kref_put(tty);
603 return count;
604} 600}
605 601
606#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ 602#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
@@ -677,7 +673,7 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
677 tty_wakeup(tty); 673 tty_wakeup(tty);
678 tty_kref_put(tty); 674 tty_kref_put(tty);
679 } 675 }
680 (void)handle_minor_send(mp); 676 handle_minor_send(mp);
681 677
682 } else { 678 } else {
683 /* ups, let capi application handle it :-) */ 679 /* ups, let capi application handle it :-) */
@@ -1114,7 +1110,7 @@ static int capinc_tty_write(struct tty_struct *tty,
1114 mp->outbytes += skb->len; 1110 mp->outbytes += skb->len;
1115 spin_unlock_bh(&mp->outlock); 1111 spin_unlock_bh(&mp->outlock);
1116 1112
1117 (void)handle_minor_send(mp); 1113 handle_minor_send(mp);
1118 1114
1119 return count; 1115 return count;
1120} 1116}
@@ -1157,7 +1153,7 @@ unlock_out:
1157 spin_unlock_bh(&mp->outlock); 1153 spin_unlock_bh(&mp->outlock);
1158 1154
1159 if (invoke_send) 1155 if (invoke_send)
1160 (void)handle_minor_send(mp); 1156 handle_minor_send(mp);
1161 1157
1162 return ret; 1158 return ret;
1163} 1159}
@@ -1179,7 +1175,7 @@ static void capinc_tty_flush_chars(struct tty_struct *tty)
1179 mp->outbytes += skb->len; 1175 mp->outbytes += skb->len;
1180 spin_unlock_bh(&mp->outlock); 1176 spin_unlock_bh(&mp->outlock);
1181 1177
1182 (void)handle_minor_send(mp); 1178 handle_minor_send(mp);
1183 } else 1179 } else
1184 spin_unlock_bh(&mp->outlock); 1180 spin_unlock_bh(&mp->outlock);
1185 1181
@@ -1269,7 +1265,7 @@ static void capinc_tty_start(struct tty_struct *tty)
1269 printk(KERN_DEBUG "capinc_tty_start\n"); 1265 printk(KERN_DEBUG "capinc_tty_start\n");
1270#endif 1266#endif
1271 mp->ttyoutstop = 0; 1267 mp->ttyoutstop = 0;
1272 (void)handle_minor_send(mp); 1268 handle_minor_send(mp);
1273} 1269}
1274 1270
1275static void capinc_tty_hangup(struct tty_struct *tty) 1271static void capinc_tty_hangup(struct tty_struct *tty)