aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-05-21 12:58:22 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2012-06-04 23:34:06 -0400
commitd660366d53119fbd988e1b1d6ea2c00358a8e688 (patch)
tree437f24f80146262fc80c71635afefe770cfb65a1 /net/bluetooth/l2cap_core.c
parentbe4aad05af0ec949a91e7bbaa55c02a954714473 (diff)
Bluetooth: Remove dead int returns
These functions were returning always 0, we just make then void. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Mat Martineau <mathewm@codeaurora.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r--net/bluetooth/l2cap_core.c48
1 files changed, 16 insertions, 32 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 5bf828753a93..b644f4085f49 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -73,7 +73,7 @@ static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data);
73static void l2cap_send_disconn_req(struct l2cap_conn *conn, 73static void l2cap_send_disconn_req(struct l2cap_conn *conn,
74 struct l2cap_chan *chan, int err); 74 struct l2cap_chan *chan, int err);
75 75
76static int l2cap_tx(struct l2cap_chan *chan, struct l2cap_ctrl *control, 76static void l2cap_tx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
77 struct sk_buff_head *skbs, u8 event); 77 struct sk_buff_head *skbs, u8 event);
78 78
79/* ---- L2CAP channels ---- */ 79/* ---- L2CAP channels ---- */
@@ -1685,8 +1685,8 @@ static void l2cap_retrans_timeout(struct work_struct *work)
1685 l2cap_chan_put(chan); 1685 l2cap_chan_put(chan);
1686} 1686}
1687 1687
1688static int l2cap_streaming_send(struct l2cap_chan *chan, 1688static void l2cap_streaming_send(struct l2cap_chan *chan,
1689 struct sk_buff_head *skbs) 1689 struct sk_buff_head *skbs)
1690{ 1690{
1691 struct sk_buff *skb; 1691 struct sk_buff *skb;
1692 struct l2cap_ctrl *control; 1692 struct l2cap_ctrl *control;
@@ -1719,8 +1719,6 @@ static int l2cap_streaming_send(struct l2cap_chan *chan,
1719 chan->next_tx_seq = __next_seq(chan, chan->next_tx_seq); 1719 chan->next_tx_seq = __next_seq(chan, chan->next_tx_seq);
1720 chan->frames_sent++; 1720 chan->frames_sent++;
1721 } 1721 }
1722
1723 return 0;
1724} 1722}
1725 1723
1726static int l2cap_ertm_send(struct l2cap_chan *chan) 1724static int l2cap_ertm_send(struct l2cap_chan *chan)
@@ -2254,13 +2252,11 @@ int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len,
2254 break; 2252 break;
2255 2253
2256 if (chan->mode == L2CAP_MODE_ERTM) 2254 if (chan->mode == L2CAP_MODE_ERTM)
2257 err = l2cap_tx(chan, NULL, &seg_queue, 2255 l2cap_tx(chan, NULL, &seg_queue, L2CAP_EV_DATA_REQUEST);
2258 L2CAP_EV_DATA_REQUEST);
2259 else 2256 else
2260 err = l2cap_streaming_send(chan, &seg_queue); 2257 l2cap_streaming_send(chan, &seg_queue);
2261 2258
2262 if (!err) 2259 err = len;
2263 err = len;
2264 2260
2265 /* If the skbs were not queued for sending, they'll still be in 2261 /* If the skbs were not queued for sending, they'll still be in
2266 * seg_queue and need to be purged. 2262 * seg_queue and need to be purged.
@@ -2383,12 +2379,10 @@ static void l2cap_abort_rx_srej_sent(struct l2cap_chan *chan)
2383 chan->rx_state = L2CAP_RX_STATE_RECV; 2379 chan->rx_state = L2CAP_RX_STATE_RECV;
2384} 2380}
2385 2381
2386static int l2cap_tx_state_xmit(struct l2cap_chan *chan, 2382static void l2cap_tx_state_xmit(struct l2cap_chan *chan,
2387 struct l2cap_ctrl *control, 2383 struct l2cap_ctrl *control,
2388 struct sk_buff_head *skbs, u8 event) 2384 struct sk_buff_head *skbs, u8 event)
2389{ 2385{
2390 int err = 0;
2391
2392 BT_DBG("chan %p, control %p, skbs %p, event %d", chan, control, skbs, 2386 BT_DBG("chan %p, control %p, skbs %p, event %d", chan, control, skbs,
2393 event); 2387 event);
2394 2388
@@ -2455,16 +2449,12 @@ static int l2cap_tx_state_xmit(struct l2cap_chan *chan,
2455 default: 2449 default:
2456 break; 2450 break;
2457 } 2451 }
2458
2459 return err;
2460} 2452}
2461 2453
2462static int l2cap_tx_state_wait_f(struct l2cap_chan *chan, 2454static void l2cap_tx_state_wait_f(struct l2cap_chan *chan,
2463 struct l2cap_ctrl *control, 2455 struct l2cap_ctrl *control,
2464 struct sk_buff_head *skbs, u8 event) 2456 struct sk_buff_head *skbs, u8 event)
2465{ 2457{
2466 int err = 0;
2467
2468 BT_DBG("chan %p, control %p, skbs %p, event %d", chan, control, skbs, 2458 BT_DBG("chan %p, control %p, skbs %p, event %d", chan, control, skbs,
2469 event); 2459 event);
2470 2460
@@ -2537,31 +2527,25 @@ static int l2cap_tx_state_wait_f(struct l2cap_chan *chan,
2537 default: 2527 default:
2538 break; 2528 break;
2539 } 2529 }
2540
2541 return err;
2542} 2530}
2543 2531
2544static int l2cap_tx(struct l2cap_chan *chan, struct l2cap_ctrl *control, 2532static void l2cap_tx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
2545 struct sk_buff_head *skbs, u8 event) 2533 struct sk_buff_head *skbs, u8 event)
2546{ 2534{
2547 int err = 0;
2548
2549 BT_DBG("chan %p, control %p, skbs %p, event %d, state %d", 2535 BT_DBG("chan %p, control %p, skbs %p, event %d, state %d",
2550 chan, control, skbs, event, chan->tx_state); 2536 chan, control, skbs, event, chan->tx_state);
2551 2537
2552 switch (chan->tx_state) { 2538 switch (chan->tx_state) {
2553 case L2CAP_TX_STATE_XMIT: 2539 case L2CAP_TX_STATE_XMIT:
2554 err = l2cap_tx_state_xmit(chan, control, skbs, event); 2540 l2cap_tx_state_xmit(chan, control, skbs, event);
2555 break; 2541 break;
2556 case L2CAP_TX_STATE_WAIT_F: 2542 case L2CAP_TX_STATE_WAIT_F:
2557 err = l2cap_tx_state_wait_f(chan, control, skbs, event); 2543 l2cap_tx_state_wait_f(chan, control, skbs, event);
2558 break; 2544 break;
2559 default: 2545 default:
2560 /* Ignore event */ 2546 /* Ignore event */
2561 break; 2547 break;
2562 } 2548 }
2563
2564 return err;
2565} 2549}
2566 2550
2567static void l2cap_pass_to_tx(struct l2cap_chan *chan, 2551static void l2cap_pass_to_tx(struct l2cap_chan *chan,